<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><script>(()=>{const e=navigator.serviceWorker;e?e.register("/sw.js").then((async e=>{console.log("SWPP 注册成功");try{await e.periodicSync.register("update",{minInterval:864e5})}catch(e){console.log("Periodic Sync 注册失败",e)}})).catch((e=>console.error("SWPP 注册失败",e))):console.warn("当前浏览器不支持 SW")})()</script><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"><title>给博客添加一个安全跳转页面 | LiuShen's Blog</title><meta name="author" content="LiuShen"><meta name="copyright" content="LiuShen"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="robots" content="index, follow"><meta name="description" content="安全跳转页面通常是指在网络安全方面的一种措施，用于确保用户在浏览网页或点击链接时不会受到恶意软件、钓鱼网站或其他网络安全威胁的影响，本篇文章将针对Hexo-theme-butterfly写一个网页安全跳转页面"><meta property="og:type" content="article"><meta property="og:title" content="给博客添加一个安全跳转页面"><meta property="og:url" content="https://blog.liushen.fun/posts/8617b98/"><meta property="og:site_name" content="LiuShen's Blog"><meta property="og:description" content="安全跳转页面通常是指在网络安全方面的一种措施，用于确保用户在浏览网页或点击链接时不会受到恶意软件、钓鱼网站或其他网络安全威胁的影响，本篇文章将针对Hexo-theme-butterfly写一个网页安全跳转页面"><meta property="og:locale" content="zh_CN"><meta property="og:image" content="https://p.liiiu.cn/i/2024/03/25/6600dd916e6c0.png"><meta property="article:published_time" content="2024-03-21T01:00:00.000Z"><meta property="article:modified_time" content="2024-03-22T16:00:00.000Z"><meta property="article:author" content="LiuShen"><meta property="article:tag" content="Hexo"><meta property="article:tag" content="安全跳转"><meta property="article:tag" content="butterfly"><meta name="twitter:card" content="summary"><meta name="twitter:image" content="https://p.liiiu.cn/i/2024/03/25/6600dd916e6c0.png"><link rel="shortcut icon" href="/favicon.ico"><link rel="canonical" href="https://blog.liushen.fun/posts/8617b98/"><link rel="preconnect" href="https://jsd.liiiu.cn"><meta name="baidu-site-verification" content="codeva-i2bF9bXDJs"><meta name="sogou_site_verification" content="1rIjtK6RhE"><meta name="360-site-verification" content="b9a9f96ae38a1932a326f8ba255cc74b"><meta name="msvalidate.01" content="F7C246820EB04DD140494C98F93A97C7"><meta name="google-site-verification" content="VH3ZE6m42MZDqpTY2tD-XoxDt9iUj2HoiC3W2neB7F4"><link rel="manifest" href="/manifest.json"><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/config/img/pwa/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/config/img/pwa/favicon-16x16.png"><link rel="mask-icon" href="/config/img/pwa/favicon-mask.svg" color="#5bbad5"><link rel="stylesheet" href="/css/index.css?v=5.0.0"><link rel="stylesheet" href="/css/custom.css?v=5.0.0"><link rel="stylesheet" href="https://jsd.liiiu.cn/npm/@fortawesome/fontawesome-free@6.7.2/css/all.min.css"><link rel="stylesheet" href="https://jsd.liiiu.cn/npm/@fancyapps/ui@5.0.36/dist/fancybox/fancybox.min.css" media="print" onload='this.media="all"'><script>(()=>{const e={set:(e,t,o)=>{if(!o)return;const n=Date.now()+864e5*o;localStorage.setItem(e,JSON.stringify({value:t,expiry:n}))},get:e=>{const t=localStorage.getItem(e);if(!t)return;const{value:o,expiry:n}=JSON.parse(t);if(!(Date.now()>n))return o;localStorage.removeItem(e)}};window.btf={saveToLocal:e,getScript:(e,t={})=>new Promise(((o,n)=>{const a=document.createElement("script");a.src=e,a.async=!0,Object.entries(t).forEach((([e,t])=>a.setAttribute(e,t))),a.onload=a.onreadystatechange=()=>{a.readyState&&!/loaded|complete/.test(a.readyState)||o()},a.onerror=n,document.head.appendChild(a)})),getCSS:(e,t)=>new Promise(((o,n)=>{const a=document.createElement("link");a.rel="stylesheet",a.href=e,t&&(a.id=t),a.onload=a.onreadystatechange=()=>{a.readyState&&!/loaded|complete/.test(a.readyState)||o()},a.onerror=n,document.head.appendChild(a)})),addGlobalFn:(e,t,o=!1,n=window)=>{const a=n.globalFn||{};a[e]=a[e]||{},o&&a[e][o]||(a[e][o||Object.keys(a[e]).length]=t,n.globalFn=a)}};const t=()=>{document.documentElement.setAttribute("data-theme","dark"),null!==document.querySelector('meta[name="theme-color"]')&&document.querySelector('meta[name="theme-color"]').setAttribute("content","#0d0d0d")},o=()=>{document.documentElement.setAttribute("data-theme","light"),null!==document.querySelector('meta[name="theme-color"]')&&document.querySelector('meta[name="theme-color"]').setAttribute("content","#ffffff")};btf.activateDarkMode=t,btf.activateLightMode=o;const n=e.get("theme"),a=(new Date).getHours();void 0===n?a<=6||a>=18?t():o():"light"===n?o():t();const r=e.get("aside-status");void 0!==r&&document.documentElement.classList.toggle("hide-aside","hide"===r);/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)&&document.documentElement.classList.add("apple")})()</script><script>const GLOBAL_CONFIG={root:"/",algolia:{appId:"7IX3UBC6JW",apiKey:"4ac2846352e499675081f1277fb961c1",indexName:"My Blog",hitsPerPage:6,languages:{input_placeholder:"搜索全站文章",hits_empty:"未找到符合您查询的内容：${query}",hits_stats:"找到 ${hits} 条结果，耗时 ${time} 毫秒"}},localSearch:void 0,translate:{defaultEncoding:2,translateDelay:0,msgToTraditionalChinese:"繁",msgToSimplifiedChinese:"簡"},noticeOutdate:{limitDay:365,position:"top",messagePrev:"本篇文章从发布到现在已经隔了",messageNext:"天了，里面的内容可能过期了，你要自己甄别一下哟👉👈"},highlight:{plugin:"highlight.js",highlightCopy:!0,highlightLang:!0,highlightHeightLimit:400,highlightFullpage:!1,highlightMacStyle:!0},copy:{success:"😋复制啦！请注意版权信息呀！",error:"😪呜呜，复制失败了！",noSupport:"🤐浏览器不支持呢，你用的啥玩意？"},relativeDate:{homepage:!1,post:!1},runtime:"天",dateSuffix:{just:"刚刚",min:"分钟前",hour:"小时前",day:"天前",month:"个月前"},copyright:{limitCount:1e3,languages:{author:"作者: LiuShen",link:"链接: ",source:"来源: LiuShen's Blog",info:"著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。"}},lightbox:"fancybox",Snackbar:{chs_to_cht:"已切换为繁体中文",cht_to_chs:"已切换为简体中文",day_to_night:"已切换为深色模式",night_to_day:"已切换为浅色模式",bgLight:"rgba(255, 255, 255, 0.509)",bgDark:"rgba(48, 48, 48, 0.509)",position:"top-right"},infinitegrid:{js:"https://jsd.liiiu.cn/npm/@egjs/infinitegrid@4.12.0/dist/infinitegrid.min.js",buttonText:"加载更多"},isPhotoFigcaption:!0,islazyload:!0,isAnchor:!1,percent:{toc:!0,rightside:!1},autoDarkmode:!1}</script><script id="config-diff">var GLOBAL_CONFIG_SITE={title:"给博客添加一个安全跳转页面",isPost:!0,isHome:!1,isHighlightShrink:void 0,isToc:!0,postUpdate:"2024-03-23 00:00:00"}</script><link rel="stylesheet" href="https://jsd.liiiu.cn/gh/willow-god/Sharding-fonts/Yozai-Medium/result.min.css"><link rel="stylesheet" href="/config/memos/memos.css"><script defer src="/sw-dom.js"></script><link rel="stylesheet" href="https://jsd.liiiu.cn/npm/swiper@11.1.14/swiper-bundle.min.css" media="print" onload='this.media="all"'><link rel="stylesheet" href="/config/swiper/swiperstyle.css" media="print" onload='this.media="all"'><meta name="generator" content="Hexo 7.3.0"><link rel="alternate" href="/atom.xml" title="LiuShen's Blog" type="application/atom+xml"></head><body><div class="float-box right top"></div><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><img class="load-image" src="" data-lazy-src="/config/img/preloader.gif" alt=""></div><script async>(()=>{const e=document.getElementById("loading-box"),d=document.body,t=()=>{d.style.overflow="",e.classList.add("loaded")},n=()=>{d.style.overflow="hidden",e.classList.remove("loaded")};n();let o=!1;window.addEventListener("load",(()=>{o||(t(),o=!0)})),setTimeout((()=>{o||(t(),o=!0)}),5e3),window.addEventListener("load",(()=>{t()})),setTimeout((function(){t()}),3e3),document.getElementById("loading-box").addEventListener("click",(()=>{t()})),document.addEventListener("pjax:send",(()=>{n()})),document.addEventListener("pjax:complete",(()=>{t()}))})()</script><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="add-menu-container"><div id="travellings"><a class="site-page" href="https://www.travellings.cn/go.html" title="友链接力-随机开往" target="_blank" rel="noopener nofollow"><i class="fa-solid fa-bus fa-fw"></i></a></div><div id="ten-years"><a class="site-page" href="https://foreverblog.cn/go.html" title="友链接力-十年之约" target="_blank" rel="noopener nofollow"><i class="fa-brands fa-nfc-symbol fa-fw"></i></a></div></div><div class="is-center" id="sidebar-avatar"><div class="avatar-img is-center"><img class="mood-icon" src="" data-lazy-src="https://p.liiiu.cn/i/2025/03/14/67d301461a24a.webp" alt="🤤" onerror='this.onerror=null,this.src="/img/friend_404.gif"'><img src="" data-lazy-src="https://p.liiiu.cn/i/2025/03/13/67d2fc82d329c.webp" onerror='this.onerror=null,this.src="/img/friend_404.gif"' alt="avatar"></div><div class="author-info__name">LiuShen</div></div><div class="site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">72</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">98</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">3</div></a></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/willow-god"><i class="fab fa-github"></i><span>Follow Me 🛫</span></a><div class="menus_items visible"><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fas fa-home"></i> <span>导航</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://www.liushen.fun/"><i class="fa-fw fa-solid fa-house-flag"></i> <span>个人主页</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://xc.liushen.fun/"><i class="fa-fw fa fa-camera-retro"></i> <span>个人相册</span></a></li></ul></div><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fa fa-graduation-cap"></i> <span>整理</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" href="/archives/"><i class="fa-fw fas fa-archive"></i> <span>时光卷轴</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fas fa-tags"></i> <span>文章标签</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fas fa-folder-open"></i> <span>文章分类</span></a></li><li><a class="site-page child" href="/charts/"><i class="fa-fw fa-solid fa-chart-pie"></i> <span>文章通览</span></a></li></ul></div><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fa-solid fa-user-group"></i> <span>友人</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" href="/link/"><i class="fa-fw fas fa-link"></i> <span>友链展示</span></a></li><li><a class="site-page child" href="/addlink/"><i class="fa-fw fa fa-at"></i> <span>友链申请</span></a></li><li><a class="site-page child" href="/fcircle/"><i class="fa-fw fa-solid fa-circle-nodes"></i> <span>朋友动态</span></a></li></ul></div><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fa fa-paper-plane"></i> <span>留言</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" href="/comment/"><i class="fa-fw fa-solid fa-chalkboard"></i> <span>留言白板</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://mm.liushen.fun/"><i class="fa-fw fa-solid fa-pen-nib"></i> <span>提笔摘星</span></a></li></ul></div><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fa-solid fa-stethoscope"></i> <span>分享</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://gist.liushen.fun/"><i class="fa-fw fa-solid fa-code"></i> <span>代码片段</span></a></li><li><a class="site-page child" href="/subscribe/"><i class="fa-fw fa-solid fa-rss"></i> <span>订阅本站</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://pan.liushen.fun/"><i class="fa-fw fa-solid fa-laptop-file"></i> <span>清羽云盘</span></a></li></ul></div><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fa fa-list"></i> <span>关于</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" href="/about/"><i class="fa-fw fa fa-address-card"></i> <span>站长资料</span></a></li><li><a class="site-page child" href="/shuoshuo/"><i class="fa-fw fa fa-commenting"></i> <span>日常说说</span></a></li><li><a class="site-page child" href="/devices/"><i class="fa-fw fa-solid fa-tachograph-digital"></i> <span>我的设备</span></a></li></ul></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg fixed" id="page-header" style="background-image:url(https://p.liiiu.cn/i/2024/03/25/6600dd916e6c0.png)"><nav id="nav"><div class="more-app-btn"><i class="fa-solid fa-fingerprint fa-fw"></i><div class="more-app-list-groups"><div class="more-app-list-groups-container"><div class="more-app-list-group"><div class="more-app-list-title">🦄常用网站</div><div class="more-app-list"><a class="more-app-list-item" href="https://www.liushen.fun/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-house"></i><span class="more-app-item-text">个人主页</span></a><a class="more-app-list-item" href="https://blog.liushen.fun/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-blog"></i><span class="more-app-item-text">个人博客</span></a><a class="more-app-list-item" href="https://xc.liushen.fun/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-image"></i><span class="more-app-item-text">个人相册</span></a><a class="more-app-list-item" href="https://github.com/willow-god" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-brands fa-github"></i><span class="more-app-item-text">Github</span></a></div></div><div class="more-app-list-group"><div class="more-app-list-title">😎周边站点</div><div class="more-app-list"><a class="more-app-list-item" href="https://gist.liushen.fun/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-code"></i><span class="more-app-item-text">代码片段</span></a><a class="more-app-list-item" href="https://mm.liushen.fun/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-pen-nib"></i><span class="more-app-item-text">提笔摘星</span></a><a class="more-app-list-item" href="https://pan.liushen.fun/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-cloud"></i><span class="more-app-item-text">清羽云盘</span></a><a class="more-app-list-item" href="https://um.liushen.fun/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-people-group"></i><span class="more-app-item-text">访客统计</span></a><a class="more-app-list-item" href="https://img.liiiu.cn/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-images"></i><span class="more-app-item-text">清羽图床</span></a><a class="more-app-list-item" href="https://chat.liushen.fun/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-robot"></i><span class="more-app-item-text">清羽AI</span></a><a class="more-app-list-item" href="https://bsz.liiiu.cn/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-chart-pie"></i><span class="more-app-item-text">不蒜计数</span></a><a class="more-app-list-item" href="https://status.liushen.fun/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-server"></i><span class="more-app-item-text">服务检测</span></a></div></div><div class="more-app-list-group"><div class="more-app-list-title">🚁实用工具</div><div class="more-app-list"><a class="more-app-list-item" href="https://tmail.qyliu.top/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-envelope"></i><span class="more-app-item-text">临时邮箱</span></a><a class="more-app-list-item" href="https://hot.liushen.fun/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-fire"></i><span class="more-app-item-text">每日热榜</span></a><a class="more-app-list-item" href="https://cover.qyliu.top/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-eye"></i><span class="more-app-item-text">封面设计</span></a><a class="more-app-list-item" href="https://mini-cover.qyliu.top/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-image"></i><span class="more-app-item-text">迷你封面</span></a><a class="more-app-list-item" href="https://icon.qyliu.top/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-icons"></i><span class="more-app-item-text">万能图标</span></a><a class="more-app-list-item" href="https://draw.qyliu.top/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-paintbrush"></i><span class="more-app-item-text">灵感白板</span></a><a class="more-app-list-item" href="https://mindmap.qyliu.top/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-network-wired"></i><span class="more-app-item-text">思维导图</span></a><a class="more-app-list-item" href="https://share.liushen.fun/#/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-share-nodes"></i><span class="more-app-item-text">内容中转</span></a></div></div></div></div></div><span id="blog-info"><a class="nav-site-title" href="/" title="LiuShen's Blog"><span class="site-name">LiuShen</span></a></span><div id="menus"></div><div class="menus_items visible"><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fas fa-home"></i> <span>导航</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://www.liushen.fun/"><i class="fa-fw fa-solid fa-house-flag"></i> <span>个人主页</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://xc.liushen.fun/"><i class="fa-fw fa fa-camera-retro"></i> <span>个人相册</span></a></li></ul></div><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fa fa-graduation-cap"></i> <span>整理</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" href="/archives/"><i class="fa-fw fas fa-archive"></i> <span>时光卷轴</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fas fa-tags"></i> <span>文章标签</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fas fa-folder-open"></i> <span>文章分类</span></a></li><li><a class="site-page child" href="/charts/"><i class="fa-fw fa-solid fa-chart-pie"></i> <span>文章通览</span></a></li></ul></div><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fa-solid fa-user-group"></i> <span>友人</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" href="/link/"><i class="fa-fw fas fa-link"></i> <span>友链展示</span></a></li><li><a class="site-page child" href="/addlink/"><i class="fa-fw fa fa-at"></i> <span>友链申请</span></a></li><li><a class="site-page child" href="/fcircle/"><i class="fa-fw fa-solid fa-circle-nodes"></i> <span>朋友动态</span></a></li></ul></div><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fa fa-paper-plane"></i> <span>留言</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" href="/comment/"><i class="fa-fw fa-solid fa-chalkboard"></i> <span>留言白板</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://mm.liushen.fun/"><i class="fa-fw fa-solid fa-pen-nib"></i> <span>提笔摘星</span></a></li></ul></div><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fa-solid fa-stethoscope"></i> <span>分享</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://gist.liushen.fun/"><i class="fa-fw fa-solid fa-code"></i> <span>代码片段</span></a></li><li><a class="site-page child" href="/subscribe/"><i class="fa-fw fa-solid fa-rss"></i> <span>订阅本站</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://pan.liushen.fun/"><i class="fa-fw fa-solid fa-laptop-file"></i> <span>清羽云盘</span></a></li></ul></div><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fa fa-list"></i> <span>关于</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" href="/about/"><i class="fa-fw fa fa-address-card"></i> <span>站长资料</span></a></li><li><a class="site-page child" href="/shuoshuo/"><i class="fa-fw fa fa-commenting"></i> <span>日常说说</span></a></li><li><a class="site-page child" href="/devices/"><i class="fa-fw fa-solid fa-tachograph-digital"></i> <span>我的设备</span></a></li></ul></div></div><center id="name-container"><a id="page-name" href="javascript:btf.scrollToDest(0, 500)">PAGE_NAME</a></center><div id="nav-right"><div id="travellings"><a class="site-page" href="https://www.travellings.cn/go.html" title="友链接力-随机开往" target="_blank" rel="noopener nofollow"><i class="fa-solid fa-bus fa-fw"></i></a></div><div id="ten-years"><a class="site-page" href="https://foreverblog.cn/go.html" title="友链接力-十年之约" target="_blank" rel="noopener nofollow"><i class="fa-brands fa-nfc-symbol fa-fw"></i></a></div><div id="random"><a class="site-page" href="javascript:randomPost()" title="随机前往一个文章"><i class="fa-solid fa-shuffle fa-fw"></i></a></div><div id="search-button"><span class="site-page social-icon search"><i class="fas fa-search fa-fw"></i></span></div><div id="toggle-menu"><span class="site-page" href="javascript:void(0);" title="展开菜单"><i class="fas fa-indent fa-fw"></i></span></div></div></nav><div id="post-info"><h1 class="post-title">给博客添加一个安全跳转页面</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2024-03-21T01:00:00.000Z" title="发表于 2024-03-21 09:00:00">2024-03-21</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2024-03-22T16:00:00.000Z" title="更新于 2024-03-23 00:00:00">2024-03-23</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/website/">博客管理</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">总字数:</span><span class="word-count">6.9k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>32分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" data-flag-title=""><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">浏览量:</span><span id="busuanzi_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span><span class="post-meta-separator">|</span><span class="post-meta-commentcount"><i class="far fa-comments fa-fw post-meta-icon"></i><span class="post-meta-label">评论数:</span><a href="/posts/8617b98/#post-comment"><span id="ArtalkCount"><i class="fa-solid fa-spinner fa-spin"></i></span></a></span></div></div></div><section class="main-hero-waves-area waves-area"><svg class="waves-svg" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s58 18 88 18 58-18 88-18 58 18 88 18v44h-352Z"></path></defs><g class="parallax"><use href="#gentle-wave" x="48" y="0"></use><use href="#gentle-wave" x="48" y="3"></use><use href="#gentle-wave" x="48" y="5"></use><use href="#gentle-wave" x="48" y="7"></use></g></svg></section></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><div class="ai-summary"><div class="ai-head"><div class="ai-head-left"><div class="ai-circle ai-circle-1"></div><div class="ai-circle ai-circle-2"></div><div class="ai-circle ai-circle-3"></div></div><div class="ai-head-right"><a class="ai-about-ai" href="/posts/40702a0d/">关于AI</a></div></div><div class="ai-explanation" style="display:block" data-summary="这里是清羽AI，这篇文章介绍了如何在博客中添加一个安全跳转页面以增强网站安全性，防止链接被滥用导致被封。作者首先尝试寻找相关资料，最终在Gitee上找到一个开源的安全跳转页面，并根据需求进行了修改。主要修改包括调整`go.js`文件，使其只对文章正文部分的链接进行跳转，而友链页面则直接跳转到目标链接。此外，作者还简化了`go.html`文件，确保所有链接都通过安全页面跳转。整个过程中，作者排除了锚点、上下翻页、按钮类、分类、标签等不需要跳转的链接，并设置了白名单以排除特定域名。最终部署完成后，博客的链接跳转更加安全可靠。">清羽AI正在绞尽脑汁想思路ING···</div><div class="ai-title"><div class="ai-title-left"><i class="fa-brands fa-slack"></i><div class="ai-title-text">清羽のAI摘要</div></div><div class="ai-tag" id="ai-tag">GLM-4-Flash</div></div></div><div class="note note-warning"><div class="note-header"><i class="note-icon fa-regular fa-circle-dot"></i> <span class="note-title">弃用说明</span></div><div class="note-content"><p>更新记录：本教程已弃用，如有需要请移步到重置版教程：<a href="/posts/9efc1657/">点击跳转</a></p></div></div><div class="note note-info"><div class="note-header"><i class="note-icon fa-regular fa-circle-check"></i> <span class="note-title">更新说明</span></div><div class="note-content"><p>更新记录：本次更新了在twikoo评论区中添加网页跳转的功能点击跳转更新内容<a class="btn-beautify" href="https://blog.liushen.fun/posts/8617b98/#twikoo安全跳转" title="最近更新"><span>最近更新</span></a></p></div></div><h2 id="碎碎念"><a href="#碎碎念" class="headerlink" title="碎碎念"></a>碎碎念</h2><p>前些天，<a target="_blank" rel="external nofollow noopener noreferrer" href="/safego/?u=aHR0cHM6Ly9sYW54aW5nLm5ldC8">揽星</a>分享了一篇文章，描述了可能会因为网站上出现被他人滥用的链接而导致被封的情况，我对于我的站点还是挺关心的，也很想将其经营下去，所以我决定也给自己的站点添加一个，加强网站的安全性，预防隐患。</p><div class="liushen-tag-link"><a class="tag-Link" target="_blank" href="/safego/?u=aHR0cHM6Ly9sYW54aW5nLm5ldC9hcmNoaXZlcy80NS8" rel="external nofollow noopener noreferrer"><div class="tag-link-tips">🙄引用站外地址，不保证站点的可用性和安全性</div><div class="tag-link-bottom"><div class="tag-link-left" style="background-image:url(https://p.liiiu.cn/i/2024/07/27/66a4632bbf06e.webp)"></div><div class="tag-link-right"><div class="tag-link-title">不良信息整改</div><div class="tag-link-sitename">揽星</div></div><i class="fa-solid fa-angle-right"></i></div></a></div><h2 id="准备工作"><a href="#准备工作" class="headerlink" title="准备工作"></a>准备工作</h2><p>首先就是上网找相关的资料了，我依稀记得之前是翻到过的，不过换了很多的关键词，都没有找到一个令人满意的，在上面曾烧到过一个npm插件，但是添加后友链也跳转了，又懒得翻看代码，所以继续寻找了，终于在大量搜索后，在gitee上找到了一个他人分享的开源安全跳转的页面，点开一看还蛮喜欢的，于是准备在它的基础上进行修改。</p><div class="liushen-tag-link"><a class="tag-Link" target="_blank" href="/safego/?u=aHR0cHM6Ly9ibG9nLmdhbnhiMi5jb20vMjU0ODIuaHRtbA" rel="external nofollow noopener noreferrer"><div class="tag-link-tips">🙄引用站外地址，不保证站点的可用性和安全性</div><div class="tag-link-bottom"><div class="tag-link-left" style="background-image:url(https://p.liiiu.cn/i/2024/07/27/66a4632bbf06e.webp)"></div><div class="tag-link-right"><div class="tag-link-title">HEXO个人博客优化魔改非插件实现为博客增加安全跳转中台页面</div><div class="tag-link-sitename">廿壴博客</div></div><i class="fa-solid fa-angle-right"></i></div></a></div><div class="liushen-tag-link"><a class="tag-Link" target="_blank" href="/safego/?u=aHR0cHM6Ly9naXRlZS5jb20vZ2FueGIyL3NhZmUtZ28" rel="external nofollow noopener noreferrer"><div class="tag-link-tips">🙄引用站外地址，不保证站点的可用性和安全性</div><div class="tag-link-bottom"><div class="tag-link-left" style="background-image:url(https://p.liiiu.cn/i/2024/07/27/66a461c3dea80.webp)"></div><div class="tag-link-right"><div class="tag-link-title">Safe-Go安全跳转中控台页面</div><div class="tag-link-sitename">gitee.com@ganxb2</div></div><i class="fa-solid fa-angle-right"></i></div></a></div><h2 id="开始部署"><a href="#开始部署" class="headerlink" title="开始部署"></a>开始部署</h2><p>首先就是按照作者的要求，将其中的go.js引入_config_butterfly.yml，然后将go.html添加到source目录下，实际上这样已经可以使用了，给原作者赞一个！但是由于原作者的个人需要，添加了下载页面跳转的功能，并且经过查看代码，其中的安全页面需要手动添加友链，并且每个页面都跳转了，这当然不行，所以我进行了一点点修改，首先修改go.js最后部分为butterfly文章页的类名，让其只识别文章正文部分的链接，并进行跳转，友链页面不跳转安全页面直接跳转到目标链接：</p><figure class="highlight javascript"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">const</span> safeGoFun = {</span><br><span class="line">  <span class="comment">// <span class="doctag">TODO:</span> a链接安全跳转（只对文章页，关于页评论 -- 评论要单独丢到waline回调中）</span></span><br><span class="line">  <span class="title class_">NzcheckLink</span>: <span class="title function_">async</span> (domName) =&gt; {</span><br><span class="line">    <span class="comment">// 获取文章页非社会分享的a标签</span></span><br><span class="line">    <span class="keyword">const</span> links = <span class="variable language_">document</span>.<span class="title function_">querySelectorAll</span>(domName);</span><br><span class="line">    <span class="keyword">if</span> (links) {</span><br><span class="line">      <span class="comment">// 锚点正则</span></span><br><span class="line">      <span class="keyword">let</span> reg = <span class="keyword">new</span> <span class="title class_">RegExp</span>(<span class="regexp">/^[#].*/</span>);</span><br><span class="line">      <span class="keyword">for</span> (<span class="keyword">let</span> i = <span class="number">0</span>; i &lt; links.<span class="property">length</span>; i++) {</span><br><span class="line">        <span class="keyword">const</span> ele = links[i];</span><br><span class="line">        <span class="keyword">let</span> eleHref = ele.<span class="title function_">getAttribute</span>(<span class="string">"href"</span>),</span><br><span class="line">          eleIsDownLoad = ele.<span class="title function_">getAttribute</span>(<span class="string">"data-download"</span>),</span><br><span class="line">          eleRel = ele.<span class="title function_">getAttribute</span>(<span class="string">"rel"</span>);</span><br><span class="line"></span><br><span class="line">        <span class="comment">// 如果你的博客添加了Gitter聊天窗，请去掉下方注释 /*|| link[i].className==="gitter-open-chat-button"*/</span></span><br><span class="line">        <span class="comment">// 排除：锚点、上下翻页、按钮类、分类、标签</span></span><br><span class="line">        <span class="keyword">if</span> (</span><br><span class="line">          !reg.<span class="title function_">test</span>(eleHref) &amp;&amp;</span><br><span class="line">          eleRel !== <span class="string">"prev"</span> &amp;&amp;</span><br><span class="line">          eleRel !== <span class="string">"next"</span> &amp;&amp;</span><br><span class="line">          eleRel !== <span class="string">"category"</span> &amp;&amp;</span><br><span class="line">          eleRel !== <span class="string">"tag"</span> &amp;&amp;</span><br><span class="line">          eleHref !== <span class="string">"javascript:void(0);"</span></span><br><span class="line">          !ele.<span class="title function_">querySelector</span>(<span class="string">'[data-fancybox]'</span>)</span><br><span class="line">        ) {</span><br><span class="line">          <span class="comment">// 判断是否下载地址和白名单，是下载拼接 &amp;type=goDown</span></span><br><span class="line">          <span class="keyword">if</span> (!(<span class="keyword">await</span> safeGoFun.<span class="title class_">NzcheckLocalSite</span>(eleHref)) &amp;&amp; !eleIsDownLoad) {</span><br><span class="line">            <span class="comment">// encodeURIComponent() URI编码</span></span><br><span class="line">            ele.<span class="title function_">setAttribute</span>(</span><br><span class="line">              <span class="string">"href"</span>,</span><br><span class="line">              <span class="string">"/go.html?goUrl="</span> + <span class="built_in">encodeURIComponent</span>(eleHref)</span><br><span class="line">            );</span><br><span class="line">          } <span class="keyword">else</span> <span class="keyword">if</span> (</span><br><span class="line">            !(<span class="keyword">await</span> safeGoFun.<span class="title class_">NzcheckLocalSite</span>(eleHref)) &amp;&amp;</span><br><span class="line">            eleIsDownLoad === <span class="string">"goDown"</span></span><br><span class="line">          ) {</span><br><span class="line">            ele.<span class="title function_">setAttribute</span>(</span><br><span class="line">              <span class="string">"href"</span>,</span><br><span class="line">              <span class="string">"/go.html?goUrl="</span> + <span class="built_in">encodeURIComponent</span>(eleHref) + <span class="string">"&amp;type=goDown"</span></span><br><span class="line">            );</span><br><span class="line">          }</span><br><span class="line">        }</span><br><span class="line">      }</span><br><span class="line">    }</span><br><span class="line">  },</span><br><span class="line">  <span class="comment">// 校验白名单，自己博客，local测试</span></span><br><span class="line">  <span class="title class_">NzcheckLocalSite</span>: <span class="title function_">async</span> (url) =&gt; {</span><br><span class="line">    <span class="keyword">try</span> {</span><br><span class="line">      <span class="comment">// 白名单地址则不修改href</span></span><br><span class="line">      <span class="keyword">const</span> safeUrls = [<span class="string">"localhost:4000"</span>, <span class="string">"qyliu.top"</span>, <span class="string">"qingyang.eu.org"</span>];</span><br><span class="line">      <span class="keyword">let</span> isOthers = <span class="literal">false</span>;</span><br><span class="line">      <span class="keyword">for</span> (<span class="keyword">let</span> i = <span class="number">0</span>; i &lt; safeUrls.<span class="property">length</span>; i++) {</span><br><span class="line">        <span class="keyword">const</span> ele = safeUrls[i];</span><br><span class="line">        <span class="keyword">if</span> (url.<span class="title function_">includes</span>(ele)) {</span><br><span class="line">          isOthers = <span class="literal">true</span>;</span><br><span class="line">          <span class="keyword">break</span>;</span><br><span class="line">        }</span><br><span class="line">      }</span><br><span class="line">      <span class="keyword">return</span> isOthers;</span><br><span class="line">    } <span class="keyword">catch</span> (err) {</span><br><span class="line">      <span class="keyword">return</span> <span class="literal">true</span>;</span><br><span class="line">    }</span><br><span class="line">  },</span><br><span class="line">};</span><br><span class="line"></span><br><span class="line"><span class="title class_">Object</span>.<span class="title function_">keys</span>(safeGoFun).<span class="title function_">forEach</span>(<span class="function">(<span class="params">key</span>) =&gt;</span> {</span><br><span class="line">  <span class="variable language_">window</span>[key] = safeGoFun[key];</span><br><span class="line">});</span><br><span class="line"></span><br><span class="line"><span class="comment">// 页面dom加载完成后，文章页不是分享按钮，不是图片灯箱，class类名不含有 not-check-link</span></span><br><span class="line"><span class="comment">// not-check-link 是小波自己设计的约定类名class，用来排除不调用跳转方法的链接</span></span><br><span class="line"><span class="variable language_">document</span>.<span class="title function_">addEventListener</span>(<span class="string">"DOMContentLoaded"</span>, <span class="keyword">function</span> (<span class="params"></span>) {</span><br><span class="line">  <span class="variable language_">window</span>.<span class="title class_">NzcheckLink</span>(</span><br><span class="line">    <span class="string">".post-content a:not(.social-share-icon):not(.data-fancybox):not(.not-check-link)"</span></span><br><span class="line">  );</span><br><span class="line">});</span><br></pre></td></tr></tbody></table></figure><p>由于我只需要链接跳转，并没有下载需要验证码并打赏的功能，所以对于go.html进行修改，让其所有都走跳转的这一条线即可，所有的源码如下：</p><figure class="highlight html"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br><span class="line">207</span><br><span class="line">208</span><br><span class="line">209</span><br><span class="line">210</span><br><span class="line">211</span><br><span class="line">212</span><br><span class="line">213</span><br><span class="line">214</span><br><span class="line">215</span><br><span class="line">216</span><br><span class="line">217</span><br><span class="line">218</span><br><span class="line">219</span><br><span class="line">220</span><br><span class="line">221</span><br><span class="line">222</span><br><span class="line">223</span><br><span class="line">224</span><br><span class="line">225</span><br><span class="line">226</span><br><span class="line">227</span><br><span class="line">228</span><br><span class="line">229</span><br><span class="line">230</span><br><span class="line">231</span><br><span class="line">232</span><br><span class="line">233</span><br><span class="line">234</span><br><span class="line">235</span><br><span class="line">236</span><br><span class="line">237</span><br><span class="line">238</span><br><span class="line">239</span><br><span class="line">240</span><br><span class="line">241</span><br><span class="line">242</span><br><span class="line">243</span><br><span class="line">244</span><br><span class="line">245</span><br><span class="line">246</span><br><span class="line">247</span><br><span class="line">248</span><br><span class="line">249</span><br><span class="line">250</span><br><span class="line">251</span><br><span class="line">252</span><br><span class="line">253</span><br><span class="line">254</span><br><span class="line">255</span><br><span class="line">256</span><br><span class="line">257</span><br><span class="line">258</span><br><span class="line">259</span><br><span class="line">260</span><br><span class="line">261</span><br><span class="line">262</span><br><span class="line">263</span><br><span class="line">264</span><br><span class="line">265</span><br><span class="line">266</span><br><span class="line">267</span><br><span class="line">268</span><br><span class="line">269</span><br><span class="line">270</span><br><span class="line">271</span><br><span class="line">272</span><br><span class="line">273</span><br><span class="line">274</span><br><span class="line">275</span><br><span class="line">276</span><br><span class="line">277</span><br><span class="line">278</span><br><span class="line">279</span><br><span class="line">280</span><br><span class="line">281</span><br><span class="line">282</span><br><span class="line">283</span><br><span class="line">284</span><br><span class="line">285</span><br><span class="line">286</span><br><span class="line">287</span><br><span class="line">288</span><br><span class="line">289</span><br><span class="line">290</span><br><span class="line">291</span><br><span class="line">292</span><br><span class="line">293</span><br><span class="line">294</span><br><span class="line">295</span><br><span class="line">296</span><br><span class="line">297</span><br><span class="line">298</span><br><span class="line">299</span><br><span class="line">300</span><br><span class="line">301</span><br><span class="line">302</span><br><span class="line">303</span><br><span class="line">304</span><br><span class="line">305</span><br><span class="line">306</span><br><span class="line">307</span><br><span class="line">308</span><br><span class="line">309</span><br><span class="line">310</span><br><span class="line">311</span><br><span class="line">312</span><br><span class="line">313</span><br><span class="line">314</span><br><span class="line">315</span><br><span class="line">316</span><br><span class="line">317</span><br><span class="line">318</span><br><span class="line">319</span><br><span class="line">320</span><br><span class="line">321</span><br><span class="line">322</span><br><span class="line">323</span><br><span class="line">324</span><br><span class="line">325</span><br><span class="line">326</span><br><span class="line">327</span><br><span class="line">328</span><br><span class="line">329</span><br><span class="line">330</span><br><span class="line">331</span><br><span class="line">332</span><br><span class="line">333</span><br><span class="line">334</span><br><span class="line">335</span><br><span class="line">336</span><br><span class="line">337</span><br><span class="line">338</span><br><span class="line">339</span><br><span class="line">340</span><br><span class="line">341</span><br><span class="line">342</span><br><span class="line">343</span><br><span class="line">344</span><br><span class="line">345</span><br><span class="line">346</span><br><span class="line">347</span><br><span class="line">348</span><br><span class="line">349</span><br><span class="line">350</span><br><span class="line">351</span><br><span class="line">352</span><br><span class="line">353</span><br><span class="line">354</span><br><span class="line">355</span><br><span class="line">356</span><br><span class="line">357</span><br><span class="line">358</span><br><span class="line">359</span><br><span class="line">360</span><br><span class="line">361</span><br><span class="line">362</span><br><span class="line">363</span><br><span class="line">364</span><br><span class="line">365</span><br><span class="line">366</span><br><span class="line">367</span><br><span class="line">368</span><br><span class="line">369</span><br><span class="line">370</span><br><span class="line">371</span><br><span class="line">372</span><br><span class="line">373</span><br><span class="line">374</span><br><span class="line">375</span><br><span class="line">376</span><br><span class="line">377</span><br><span class="line">378</span><br><span class="line">379</span><br><span class="line">380</span><br><span class="line">381</span><br><span class="line">382</span><br><span class="line">383</span><br><span class="line">384</span><br><span class="line">385</span><br><span class="line">386</span><br><span class="line">387</span><br><span class="line">388</span><br><span class="line">389</span><br><span class="line">390</span><br><span class="line">391</span><br><span class="line">392</span><br><span class="line">393</span><br><span class="line">394</span><br><span class="line">395</span><br><span class="line">396</span><br><span class="line">397</span><br><span class="line">398</span><br><span class="line">399</span><br><span class="line">400</span><br><span class="line">401</span><br><span class="line">402</span><br><span class="line">403</span><br><span class="line">404</span><br><span class="line">405</span><br><span class="line">406</span><br><span class="line">407</span><br><span class="line">408</span><br><span class="line">409</span><br><span class="line">410</span><br><span class="line">411</span><br><span class="line">412</span><br><span class="line">413</span><br><span class="line">414</span><br><span class="line">415</span><br><span class="line">416</span><br><span class="line">417</span><br><span class="line">418</span><br><span class="line">419</span><br><span class="line">420</span><br><span class="line">421</span><br><span class="line">422</span><br><span class="line">423</span><br><span class="line">424</span><br><span class="line">425</span><br><span class="line">426</span><br><span class="line">427</span><br><span class="line">428</span><br><span class="line">429</span><br><span class="line">430</span><br><span class="line">431</span><br><span class="line">432</span><br><span class="line">433</span><br><span class="line">434</span><br><span class="line">435</span><br><span class="line">436</span><br><span class="line">437</span><br><span class="line">438</span><br><span class="line">439</span><br><span class="line">440</span><br><span class="line">441</span><br><span class="line">442</span><br><span class="line">443</span><br><span class="line">444</span><br><span class="line">445</span><br><span class="line">446</span><br><span class="line">447</span><br><span class="line">448</span><br><span class="line">449</span><br><span class="line">450</span><br><span class="line">451</span><br><span class="line">452</span><br><span class="line">453</span><br><span class="line">454</span><br><span class="line">455</span><br><span class="line">456</span><br><span class="line">457</span><br><span class="line">458</span><br><span class="line">459</span><br><span class="line">460</span><br><span class="line">461</span><br><span class="line">462</span><br><span class="line">463</span><br><span class="line">464</span><br><span class="line">465</span><br><span class="line">466</span><br><span class="line">467</span><br><span class="line">468</span><br><span class="line">469</span><br><span class="line">470</span><br><span class="line">471</span><br><span class="line">472</span><br><span class="line">473</span><br><span class="line">474</span><br><span class="line">475</span><br><span class="line">476</span><br><span class="line">477</span><br><span class="line">478</span><br><span class="line">479</span><br><span class="line">480</span><br><span class="line">481</span><br><span class="line">482</span><br><span class="line">483</span><br><span class="line">484</span><br><span class="line">485</span><br><span class="line">486</span><br><span class="line">487</span><br><span class="line">488</span><br><span class="line">489</span><br><span class="line">490</span><br><span class="line">491</span><br><span class="line">492</span><br><span class="line">493</span><br><span class="line">494</span><br><span class="line">495</span><br><span class="line">496</span><br><span class="line">497</span><br><span class="line">498</span><br><span class="line">499</span><br><span class="line">500</span><br><span class="line">501</span><br><span class="line">502</span><br><span class="line">503</span><br><span class="line">504</span><br><span class="line">505</span><br><span class="line">506</span><br><span class="line">507</span><br><span class="line">508</span><br><span class="line">509</span><br><span class="line">510</span><br><span class="line">511</span><br><span class="line">512</span><br><span class="line">513</span><br><span class="line">514</span><br><span class="line">515</span><br><span class="line">516</span><br><span class="line">517</span><br><span class="line">518</span><br><span class="line">519</span><br><span class="line">520</span><br><span class="line">521</span><br><span class="line">522</span><br><span class="line">523</span><br><span class="line">524</span><br><span class="line">525</span><br><span class="line">526</span><br><span class="line">527</span><br><span class="line">528</span><br><span class="line">529</span><br><span class="line">530</span><br><span class="line">531</span><br><span class="line">532</span><br><span class="line">533</span><br><span class="line">534</span><br><span class="line">535</span><br><span class="line">536</span><br><span class="line">537</span><br><span class="line">538</span><br><span class="line">539</span><br><span class="line">540</span><br><span class="line">541</span><br><span class="line">542</span><br><span class="line">543</span><br><span class="line">544</span><br><span class="line">545</span><br><span class="line">546</span><br><span class="line">547</span><br><span class="line">548</span><br><span class="line">549</span><br><span class="line">550</span><br><span class="line">551</span><br><span class="line">552</span><br><span class="line">553</span><br><span class="line">554</span><br><span class="line">555</span><br><span class="line">556</span><br><span class="line">557</span><br><span class="line">558</span><br><span class="line">559</span><br><span class="line">560</span><br><span class="line">561</span><br><span class="line">562</span><br><span class="line">563</span><br><span class="line">564</span><br><span class="line">565</span><br><span class="line">566</span><br><span class="line">567</span><br><span class="line">568</span><br><span class="line">569</span><br><span class="line">570</span><br><span class="line">571</span><br><span class="line">572</span><br><span class="line">573</span><br><span class="line">574</span><br><span class="line">575</span><br><span class="line">576</span><br><span class="line">577</span><br><span class="line">578</span><br><span class="line">579</span><br><span class="line">580</span><br><span class="line">581</span><br><span class="line">582</span><br><span class="line">583</span><br><span class="line">584</span><br><span class="line">585</span><br><span class="line">586</span><br><span class="line">587</span><br><span class="line">588</span><br><span class="line">589</span><br><span class="line">590</span><br><span class="line">591</span><br><span class="line">592</span><br><span class="line">593</span><br><span class="line">594</span><br><span class="line">595</span><br><span class="line">596</span><br><span class="line">597</span><br><span class="line">598</span><br><span class="line">599</span><br><span class="line">600</span><br><span class="line">601</span><br><span class="line">602</span><br><span class="line">603</span><br><span class="line">604</span><br><span class="line">605</span><br><span class="line">606</span><br><span class="line">607</span><br><span class="line">608</span><br><span class="line">609</span><br><span class="line">610</span><br><span class="line">611</span><br><span class="line">612</span><br><span class="line">613</span><br><span class="line">614</span><br><span class="line">615</span><br><span class="line">616</span><br><span class="line">617</span><br><span class="line">618</span><br><span class="line">619</span><br><span class="line">620</span><br><span class="line">621</span><br><span class="line">622</span><br><span class="line">623</span><br><span class="line">624</span><br><span class="line">625</span><br><span class="line">626</span><br><span class="line">627</span><br><span class="line">628</span><br><span class="line">629</span><br><span class="line">630</span><br><span class="line">631</span><br><span class="line">632</span><br><span class="line">633</span><br><span class="line">634</span><br><span class="line">635</span><br><span class="line">636</span><br><span class="line">637</span><br><span class="line">638</span><br><span class="line">639</span><br><span class="line">640</span><br><span class="line">641</span><br><span class="line">642</span><br><span class="line">643</span><br><span class="line">644</span><br><span class="line">645</span><br><span class="line">646</span><br><span class="line">647</span><br><span class="line">648</span><br><span class="line">649</span><br><span class="line">650</span><br><span class="line">651</span><br><span class="line">652</span><br><span class="line">653</span><br><span class="line">654</span><br><span class="line">655</span><br><span class="line">656</span><br><span class="line">657</span><br><span class="line">658</span><br><span class="line">659</span><br><span class="line">660</span><br><span class="line">661</span><br><span class="line">662</span><br><span class="line">663</span><br><span class="line">664</span><br><span class="line">665</span><br><span class="line">666</span><br><span class="line">667</span><br><span class="line">668</span><br><span class="line">669</span><br><span class="line">670</span><br><span class="line">671</span><br><span class="line">672</span><br><span class="line">673</span><br><span class="line">674</span><br><span class="line">675</span><br><span class="line">676</span><br><span class="line">677</span><br><span class="line">678</span><br><span class="line">679</span><br><span class="line">680</span><br><span class="line">681</span><br><span class="line">682</span><br><span class="line">683</span><br><span class="line">684</span><br><span class="line">685</span><br><span class="line">686</span><br><span class="line">687</span><br><span class="line">688</span><br><span class="line">689</span><br><span class="line">690</span><br><span class="line">691</span><br><span class="line">692</span><br><span class="line">693</span><br><span class="line">694</span><br><span class="line">695</span><br><span class="line">696</span><br><span class="line">697</span><br><span class="line">698</span><br><span class="line">699</span><br><span class="line">700</span><br><span class="line">701</span><br><span class="line">702</span><br><span class="line">703</span><br><span class="line">704</span><br><span class="line">705</span><br><span class="line">706</span><br><span class="line">707</span><br><span class="line">708</span><br><span class="line">709</span><br><span class="line">710</span><br><span class="line">711</span><br><span class="line">712</span><br><span class="line">713</span><br><span class="line">714</span><br><span class="line">715</span><br><span class="line">716</span><br><span class="line">717</span><br><span class="line">718</span><br><span class="line">719</span><br><span class="line">720</span><br><span class="line">721</span><br><span class="line">722</span><br><span class="line">723</span><br><span class="line">724</span><br><span class="line">725</span><br><span class="line">726</span><br><span class="line">727</span><br><span class="line">728</span><br><span class="line">729</span><br><span class="line">730</span><br><span class="line">731</span><br><span class="line">732</span><br><span class="line">733</span><br><span class="line">734</span><br><span class="line">735</span><br><span class="line">736</span><br><span class="line">737</span><br><span class="line">738</span><br><span class="line">739</span><br><span class="line">740</span><br><span class="line">741</span><br><span class="line">742</span><br><span class="line">743</span><br><span class="line">744</span><br><span class="line">745</span><br><span class="line">746</span><br><span class="line">747</span><br><span class="line">748</span><br><span class="line">749</span><br><span class="line">750</span><br><span class="line">751</span><br><span class="line">752</span><br><span class="line">753</span><br><span class="line">754</span><br><span class="line">755</span><br><span class="line">756</span><br><span class="line">757</span><br><span class="line">758</span><br><span class="line">759</span><br><span class="line">760</span><br><span class="line">761</span><br><span class="line">762</span><br><span class="line">763</span><br><span class="line">764</span><br><span class="line">765</span><br><span class="line">766</span><br><span class="line">767</span><br><span class="line">768</span><br><span class="line">769</span><br><span class="line">770</span><br><span class="line">771</span><br><span class="line">772</span><br><span class="line">773</span><br><span class="line">774</span><br><span class="line">775</span><br><span class="line">776</span><br><span class="line">777</span><br><span class="line">778</span><br><span class="line">779</span><br><span class="line">780</span><br><span class="line">781</span><br><span class="line">782</span><br><span class="line">783</span><br><span class="line">784</span><br><span class="line">785</span><br><span class="line">786</span><br><span class="line">787</span><br><span class="line">788</span><br><span class="line">789</span><br><span class="line">790</span><br><span class="line">791</span><br><span class="line">792</span><br><span class="line">793</span><br><span class="line">794</span><br><span class="line">795</span><br><span class="line">796</span><br><span class="line">797</span><br><span class="line">798</span><br><span class="line">799</span><br><span class="line">800</span><br><span class="line">801</span><br><span class="line">802</span><br><span class="line">803</span><br><span class="line">804</span><br><span class="line">805</span><br><span class="line">806</span><br><span class="line">807</span><br><span class="line">808</span><br><span class="line">809</span><br><span class="line">810</span><br><span class="line">811</span><br><span class="line">812</span><br><span class="line">813</span><br><span class="line">814</span><br><span class="line">815</span><br><span class="line">816</span><br><span class="line">817</span><br><span class="line">818</span><br><span class="line">819</span><br><span class="line">820</span><br><span class="line">821</span><br><span class="line">822</span><br><span class="line">823</span><br><span class="line">824</span><br><span class="line">825</span><br><span class="line">826</span><br><span class="line">827</span><br><span class="line">828</span><br><span class="line">829</span><br><span class="line">830</span><br><span class="line">831</span><br><span class="line">832</span><br><span class="line">833</span><br><span class="line">834</span><br><span class="line">835</span><br><span class="line">836</span><br><span class="line">837</span><br><span class="line">838</span><br><span class="line">839</span><br><span class="line">840</span><br><span class="line">841</span><br><span class="line">842</span><br><span class="line">843</span><br><span class="line">844</span><br><span class="line">845</span><br><span class="line">846</span><br><span class="line">847</span><br><span class="line">848</span><br><span class="line">849</span><br><span class="line">850</span><br><span class="line">851</span><br><span class="line">852</span><br><span class="line">853</span><br><span class="line">854</span><br><span class="line">855</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">layout: false</span><br><span class="line">---</span><br><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">data-user-color-scheme</span>=<span class="string">"light"</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">"content-type"</span> <span class="attr">content</span>=<span class="string">"text/html; charset=utf-8"</span> /&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">"X-UA-Compatible"</span> <span class="attr">content</span>=<span class="string">"IE=Edge"</span> /&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">"viewport"</span> <span class="attr">content</span>=<span class="string">"width=device-width, initial-scale=1.0, shrink-to-fit=no"</span> /&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">title</span>&gt;</span></span><br><span class="line">    安全中心 | LiuShen's Blog</span><br><span class="line">  <span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">link</span> <span class="attr">rel</span>=<span class="string">"icon"</span> <span class="attr">class</span>=<span class="string">"icon-favicon"</span> <span class="attr">href</span>=<span class="string">"/"</span> /&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">link</span> <span class="attr">rel</span>=<span class="string">"stylesheet"</span> <span class="attr">href</span>=<span class="string">"https://lib.baomitu.com/twitter-bootstrap/4.6.1/css/bootstrap.min.css"</span> /&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">link</span> <span class="attr">rel</span>=<span class="string">"stylesheet"</span> <span class="attr">href</span>=<span class="string">"https://at.alicdn.com/t/font_1736178_lbnruvf0jn.css"</span> /&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">style</span> <span class="attr">type</span>=<span class="string">"text/css"</span>&gt;</span><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="comment">/* // 向上渐隐显示(主内容使用) */</span></span></span><br><span class="line"><span class="language-css">    <span class="keyword">@-webkit-keyframes</span> fadeInUp {</span></span><br><span class="line"><span class="language-css">      <span class="number">0%</span> {</span></span><br><span class="line"><span class="language-css">        <span class="attribute">opacity</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="language-css">        <span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="number">24px</span>);</span></span><br><span class="line"><span class="language-css">      }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">      <span class="number">100%</span> {</span></span><br><span class="line"><span class="language-css">        <span class="attribute">opacity</span>: <span class="number">1</span>;</span></span><br><span class="line"><span class="language-css">        <span class="attribute">transform</span>: <span class="built_in">translateY</span>(-<span class="number">80px</span>);</span></span><br><span class="line"><span class="language-css">      }</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="keyword">@keyframes</span> fadeInUp {</span></span><br><span class="line"><span class="language-css">      <span class="number">0%</span> {</span></span><br><span class="line"><span class="language-css">        <span class="attribute">opacity</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="language-css">        -webkit-<span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="number">24px</span>);</span></span><br><span class="line"><span class="language-css">        -ms-<span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="number">24px</span>);</span></span><br><span class="line"><span class="language-css">        <span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="number">24px</span>);</span></span><br><span class="line"><span class="language-css">      }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">      <span class="number">100%</span> {</span></span><br><span class="line"><span class="language-css">        <span class="attribute">opacity</span>: <span class="number">1</span>;</span></span><br><span class="line"><span class="language-css">        -webkit-<span class="attribute">transform</span>: <span class="built_in">translateY</span>(-<span class="number">80px</span>);</span></span><br><span class="line"><span class="language-css">        -ms-<span class="attribute">transform</span>: <span class="built_in">translateY</span>(-<span class="number">80px</span>);</span></span><br><span class="line"><span class="language-css">        <span class="attribute">transform</span>: <span class="built_in">translateY</span>(-<span class="number">80px</span>);</span></span><br><span class="line"><span class="language-css">      }</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="comment">/* // 向上渐隐显示(成功错误提示) */</span></span></span><br><span class="line"><span class="language-css">    <span class="keyword">@-webkit-keyframes</span> alertFadeInUp {</span></span><br><span class="line"><span class="language-css">      <span class="number">0%</span> {</span></span><br><span class="line"><span class="language-css">        <span class="attribute">opacity</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="language-css">        <span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="number">24px</span>);</span></span><br><span class="line"><span class="language-css">      }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">      <span class="number">75%</span> {</span></span><br><span class="line"><span class="language-css">        <span class="attribute">opacity</span>: <span class="number">1</span>;</span></span><br><span class="line"><span class="language-css">        <span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="number">0</span>);</span></span><br><span class="line"><span class="language-css">      }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">      <span class="number">100%</span> {</span></span><br><span class="line"><span class="language-css">        <span class="attribute">opacity</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="language-css">      }</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="keyword">@keyframes</span> alertFadeInUp {</span></span><br><span class="line"><span class="language-css">      <span class="number">0%</span> {</span></span><br><span class="line"><span class="language-css">        <span class="attribute">opacity</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="language-css">        -webkit-<span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="number">24px</span>);</span></span><br><span class="line"><span class="language-css">        -ms-<span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="number">24px</span>);</span></span><br><span class="line"><span class="language-css">        <span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="number">24px</span>);</span></span><br><span class="line"><span class="language-css">      }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">      <span class="number">75%</span> {</span></span><br><span class="line"><span class="language-css">        <span class="attribute">opacity</span>: <span class="number">1</span>;</span></span><br><span class="line"><span class="language-css">        -webkit-<span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="number">0</span>);</span></span><br><span class="line"><span class="language-css">        -ms-<span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="number">0</span>);</span></span><br><span class="line"><span class="language-css">        <span class="attribute">transform</span>: <span class="built_in">translateY</span>(<span class="number">0</span>);</span></span><br><span class="line"><span class="language-css">      }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">      <span class="number">100%</span> {</span></span><br><span class="line"><span class="language-css">        <span class="attribute">opacity</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="language-css">      }</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="keyword">@-webkit-keyframes</span> fadeOutUp {</span></span><br><span class="line"><span class="language-css">      <span class="number">0%</span> {</span></span><br><span class="line"><span class="language-css">        <span class="attribute">opacity</span>: <span class="number">1</span>;</span></span><br><span class="line"><span class="language-css">      }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">      <span class="selector-tag">to</span> {</span></span><br><span class="line"><span class="language-css">        <span class="attribute">opacity</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="language-css">        <span class="attribute">transform</span>: <span class="built_in">translate3d</span>(<span class="number">0</span>, -<span class="number">350%</span>, <span class="number">0</span>);</span></span><br><span class="line"><span class="language-css">      }</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="keyword">@keyframes</span> fadeOutUp {</span></span><br><span class="line"><span class="language-css">      <span class="number">0%</span> {</span></span><br><span class="line"><span class="language-css">        <span class="attribute">opacity</span>: <span class="number">1</span>;</span></span><br><span class="line"><span class="language-css">      }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">      <span class="selector-tag">to</span> {</span></span><br><span class="line"><span class="language-css">        <span class="attribute">opacity</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="language-css">        -webkit-<span class="attribute">transform</span>: <span class="built_in">translate3d</span>(<span class="number">0</span>, -<span class="number">350%</span>, <span class="number">0</span>);</span></span><br><span class="line"><span class="language-css">        <span class="attribute">transform</span>: <span class="built_in">translate3d</span>(<span class="number">0</span>, -<span class="number">350%</span>, <span class="number">0</span>);</span></span><br><span class="line"><span class="language-css">      }</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-pseudo">:root</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attr">--blue</span>: <span class="number">#007bff</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--indigo</span>: <span class="number">#6610f2</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--purple</span>: <span class="number">#6f42c1</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--pink</span>: <span class="number">#e83e8c</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--red</span>: <span class="number">#dc3545</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--orange</span>: <span class="number">#fd7e14</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--yellow</span>: <span class="number">#ffc107</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--green</span>: <span class="number">#28a745</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--teal</span>: <span class="number">#20c997</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--cyan</span>: <span class="number">#17a2b8</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--white</span>: <span class="number">#fff</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--gray</span>: <span class="number">#6c757d</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--gray-dark</span>: <span class="number">#343a40</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--primary</span>: <span class="number">#007bff</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--secondary</span>: <span class="number">#6c757d</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--success</span>: <span class="number">#28a745</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--info</span>: <span class="number">#17a2b8</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--warning</span>: <span class="number">#ffc107</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--danger</span>: <span class="number">#dc3545</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--light</span>: <span class="number">#f8f9fa</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--dark</span>: <span class="number">#343a40</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--breakpoint-xs</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--breakpoint-sm</span>: <span class="number">576px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--breakpoint-md</span>: <span class="number">768px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--breakpoint-lg</span>: <span class="number">992px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--breakpoint-xl</span>: <span class="number">1200px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--font-family-sans-serif</span>: -apple-system, BlinkMacSystemFont, <span class="string">"Segoe UI"</span>,</span></span><br><span class="line"><span class="language-css">        <span class="string">"PingFang SC"</span>, Roboto, <span class="string">"Helvetica Neue"</span>, Arial, <span class="string">"Noto Sans"</span>,</span></span><br><span class="line"><span class="language-css">        <span class="string">"Liberation Sans"</span>, sans-serif, <span class="string">"Apple Color Emoji"</span>, <span class="string">"Segoe UI Emoji"</span>,</span></span><br><span class="line"><span class="language-css">        <span class="string">"Segoe UI Symbol"</span>, <span class="string">"Noto Color Emoji"</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--font-family-monospace</span>: SFMono-Regular, Menlo, Monaco, Consolas,</span></span><br><span class="line"><span class="language-css">        <span class="string">"Liberation Mono"</span>, <span class="string">"Courier New"</span>, monospace;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-attr">[data-user-color-scheme=<span class="string">"dark"</span>]</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attr">--body-bg-color</span>: <span class="number">#22272e</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--board-bg-color</span>: <span class="number">#2b313a</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--text-color</span>: <span class="number">#adbac7</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--sec-text-color</span>: <span class="number">#b3bac1</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--post-text-color</span>: <span class="number">#adbac7</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--post-heading-color</span>: <span class="number">#adbac7</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--post-link-color</span>: <span class="number">#34a3ff</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--link-hover-color</span>: <span class="number">#30a9de</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--link-hover-bg-color</span>: <span class="number">#22272e</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--line-color</span>: <span class="number">#adbac7</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--navbar-bg-color</span>: <span class="number">#22272e</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--navbar-text-color</span>: <span class="number">#cbd4dc</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--subtitle-color</span>: <span class="number">#cbd4dc</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--scrollbar-color</span>: <span class="number">#30a9de</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--scrollbar-hover-color</span>: <span class="number">#34a3ff</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--button-bg-color</span>: transparent;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--button-hover-bg-color</span>: <span class="number">#46647e</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--highlight-bg-color</span>: <span class="number">#2d333b</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attr">--inlinecode-bg-color</span>: <span class="built_in">rgba</span>(<span class="number">99</span>, <span class="number">110</span>, <span class="number">123</span>, <span class="number">0.4</span>);</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    ::-webkit-scrollbar {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">width</span>: <span class="number">6px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">height</span>: <span class="number">6px</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    ::-webkit-scrollbar-corner {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">background-color</span>: transparent;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    ::-webkit-scrollbar-thumb {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">background-color</span>: <span class="built_in">var</span>(--scrollbar-color);</span></span><br><span class="line"><span class="language-css">      <span class="attribute">border-radius</span>: <span class="number">6px</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-tag">html</span> {</span></span><br><span class="line"><span class="language-css">      -webkit-<span class="attribute">text-size-adjust</span>: <span class="number">100%</span>;</span></span><br><span class="line"><span class="language-css">      -webkit-tap-highlight-<span class="attribute">color</span>: transparent;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-tag">html</span>,</span></span><br><span class="line"><span class="language-css">    <span class="selector-tag">body</span> {</span></span><br><span class="line"><span class="language-css">      <span class="comment">/* background: #f3f4f5; */</span></span></span><br><span class="line"><span class="language-css">      <span class="comment">/* font-family: PingFang SC, Hiragino Sans GB, Arial, Microsoft YaHei,</span></span></span><br><span class="line"><span class="comment"><span class="language-css">          Verdana, Roboto, Noto, Helvetica Neue, sans-serif; */</span></span></span><br><span class="line"><span class="language-css">      <span class="attribute">font-family</span>: <span class="built_in">var</span>(--font-family-sans-serif);</span></span><br><span class="line"><span class="language-css">      <span class="attribute">padding</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">margin</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">background-color</span>: <span class="built_in">var</span>(--body-bg-color);</span></span><br><span class="line"><span class="language-css">      <span class="attribute">color</span>: <span class="built_in">var</span>(--text-color);</span></span><br><span class="line"><span class="language-css">      <span class="attribute">transition</span>: color <span class="number">0.2s</span> ease-in-out, background-color <span class="number">0.2s</span> ease-in-out;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">height</span>: <span class="number">100%</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-tag">body</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">font-size</span>: <span class="number">1rem</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-tag">p</span>,</span></span><br><span class="line"><span class="language-css">    <span class="selector-tag">div</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">padding</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">margin</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-tag">a</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">text-decoration</span>: none;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">transition</span>: color <span class="number">0.2s</span> ease-in-out, background-color <span class="number">0.2s</span> ease-in-out;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-tag">body</span> <span class="selector-tag">a</span><span class="selector-pseudo">:hover</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">color</span>: <span class="built_in">var</span>(--link-hover-color);</span></span><br><span class="line"><span class="language-css">      <span class="attribute">text-decoration</span>: none;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.go-page</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">height</span>: <span class="number">100%</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> {</span></span><br><span class="line"><span class="language-css">      <span class="comment">/* padding-top: 220px; */</span></span></span><br><span class="line"><span class="language-css">      <span class="attribute">width</span>: <span class="number">450px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">margin</span>: auto;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">word-break</span>: break-all;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">height</span>: <span class="number">100%</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> <span class="selector-class">.logo-img</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">margin-bottom</span>: <span class="number">20px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">text-align</span>: center;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">padding-top</span>: <span class="number">220px</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> <span class="selector-class">.logo-img</span> <span class="selector-tag">p</span><span class="selector-pseudo">:first-child</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">font-size</span>: <span class="number">22px</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> <span class="selector-class">.logo-img</span> <span class="selector-tag">img</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">display</span>: block;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">width</span>: <span class="number">175px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">height</span>: <span class="number">48px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">margin</span>: auto;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">margin-bottom</span>: <span class="number">16px</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> <span class="selector-class">.loading-item</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">background</span>: <span class="number">#fff</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">padding</span>: <span class="number">24px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">border-radius</span>: <span class="number">12px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">border</span>: <span class="number">1px</span> solid <span class="number">#e1e1e1</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">margin-bottom</span>: <span class="number">10px</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="comment">/* 绿色 */</span></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> <span class="selector-class">.tip1</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">background</span>: <span class="number">#f0f9ea</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="comment">/* 黄色 */</span></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> <span class="selector-class">.tip2</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">background</span>: <span class="number">#fdf5e6</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="comment">/* 红色 */</span></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> <span class="selector-class">.tip3</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">background</span>: <span class="number">#fef0f0</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> <span class="selector-class">.icon-snapchat-fill</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">font-size</span>: <span class="number">20px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">color</span>: <span class="number">#fc5531</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">border</span>: <span class="number">1px</span> solid <span class="number">#fc5531</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">border-radius</span>: <span class="number">50%</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">width</span>: <span class="number">32px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">text-align</span>: center;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">margin-right</span>: <span class="number">5px</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> <span class="selector-class">.tip1</span> <span class="selector-class">.icon-snapchat-fill</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">color</span>: <span class="built_in">var</span>(--post-link-color);</span></span><br><span class="line"><span class="language-css">      <span class="attribute">border-color</span>: <span class="built_in">var</span>(--post-link-color);</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> <span class="selector-class">.loading-text</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">font-size</span>: <span class="number">16px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">font-weight</span>: <span class="number">600</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">color</span>: <span class="number">#222226</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">line-height</span>: <span class="number">22px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="comment">/* margin-left: 12px; */</span></span></span><br><span class="line"><span class="language-css">      <span class="attribute">overflow</span>: hidden;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">text-overflow</span>: ellipsis;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">white-space</span>: nowrap;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> <span class="selector-class">.flex</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">display</span>: flex;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">align-items</span>: center;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> <span class="selector-class">.flex-end</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">display</span>: flex;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">justify-content</span>: flex-end;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="comment">/* #267dcc 蓝色 */</span></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> <span class="selector-class">.loading-color1</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">color</span>: <span class="built_in">var</span>(--post-link-color);</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> <span class="selector-class">.loading-color2</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">color</span>: <span class="number">#fc5531</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> <span class="selector-class">.loading-tip</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">padding</span>: <span class="number">12px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">margin-bottom</span>: <span class="number">16px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">border-radius</span>: <span class="number">4px</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> <span class="selector-class">.loading-topic</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">font-size</span>: <span class="number">14px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">color</span>: <span class="number">#222226</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">line-height</span>: <span class="number">24px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">margin-bottom</span>: <span class="number">24px</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.loading-topic</span> <span class="selector-class">.flex</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">flex-direction</span>: column;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> <span class="selector-class">.loading-img</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">width</span>: <span class="number">24px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">height</span>: <span class="number">24px</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="comment">/* #fc5531; #fc5531*/</span></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> <span class="selector-class">.loading-btn</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">font-size</span>: <span class="number">14px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">color</span>: <span class="built_in">var</span>(--post-link-color);</span></span><br><span class="line"><span class="language-css">      <span class="attribute">border</span>: <span class="number">1px</span> solid <span class="built_in">var</span>(--post-link-color);</span></span><br><span class="line"><span class="language-css">      <span class="attribute">display</span>: inline-block;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">box-sizing</span>: border-box;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">padding</span>: <span class="number">6px</span> <span class="number">18px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">border-radius</span>: <span class="number">18px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">margin-left</span>: <span class="number">8px</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> <span class="selector-class">.loading-btn</span><span class="selector-pseudo">:hover</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">color</span>: <span class="built_in">var</span>(--link-hover-color);</span></span><br><span class="line"><span class="language-css">      <span class="attribute">border-color</span>: <span class="built_in">var</span>(--link-hover-color);</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.content</span> <span class="selector-class">.loading-btn-github</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">width</span>: <span class="number">121px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">background</span>: <span class="number">#fc5531</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">color</span>: <span class="number">#fff</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.hidden</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">display</span>: none;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.form-control</span><span class="selector-class">.hidden</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">display</span>: none <span class="meta">!important</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.mp-img-box</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">text-align</span>: center;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">margin-bottom</span>: <span class="number">10px</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.mp-img</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">max-width</span>: <span class="number">400px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">width</span>: <span class="number">100%</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">box-shadow</span>: <span class="number">5px</span> <span class="number">5px</span> <span class="number">15px</span> <span class="built_in">rgb</span>(<span class="number">0</span> <span class="number">0</span> <span class="number">0</span> / <span class="number">8%</span>);</span></span><br><span class="line"><span class="language-css">      <span class="attribute">margin-bottom</span>: <span class="number">5px</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.fadeInUp</span> {</span></span><br><span class="line"><span class="language-css">      -webkit-<span class="attribute">animation-name</span>: fadeInUp;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">animation-name</span>: fadeInUp;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.alertFadeInUp</span> {</span></span><br><span class="line"><span class="language-css">      -webkit-<span class="attribute">animation-name</span>: alertFadeInUp;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">animation-name</span>: alertFadeInUp;</span></span><br><span class="line"><span class="language-css">      -webkit-<span class="attribute">animation-duration</span>: <span class="number">3s</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">animation-duration</span>: <span class="number">3s</span>;</span></span><br><span class="line"><span class="language-css">      -webkit-<span class="attribute">animation-fill-mode</span>: both;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">animation-fill-mode</span>: both;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.fadeOutUp</span> {</span></span><br><span class="line"><span class="language-css">      -webkit-<span class="attribute">animation-name</span>: fadeOutUp;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">animation-name</span>: fadeOutUp;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.fade-animate</span> {</span></span><br><span class="line"><span class="language-css">      -webkit-<span class="attribute">animation-duration</span>: <span class="number">1s</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">animation-duration</span>: <span class="number">1s</span>;</span></span><br><span class="line"><span class="language-css">      -webkit-<span class="attribute">animation-fill-mode</span>: both;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">animation-fill-mode</span>: both;</span></span><br><span class="line"><span class="language-css">      -webkit-<span class="attribute">animation-delay</span>: <span class="number">1s</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">animation-delay</span>: <span class="number">1s</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.go-alert</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">margin</span>: <span class="number">0</span> auto;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">width</span>: <span class="number">110px</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">position</span>: absolute;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">left</span>: <span class="number">46%</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">top</span>: <span class="number">5%</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">opacity</span>: <span class="number">0</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">text-align</span>: center;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.footer</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">text-align</span>: center;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">position</span>: relative;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">margin-bottom</span>: <span class="number">20px</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.footer</span> <span class="selector-tag">a</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">color</span>: <span class="built_in">var</span>(--text-color);</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.flex-box</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">display</span>: flex;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">height</span>: <span class="number">100vh</span>;</span></span><br><span class="line"><span class="language-css">      <span class="attribute">flex-direction</span>: column;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.flex-contain</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">flex</span>: <span class="number">1</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="selector-class">.flex-footer</span> {</span></span><br><span class="line"><span class="language-css">      <span class="attribute">height</span>: <span class="number">24px</span>;</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">    <span class="keyword">@media</span> (<span class="attribute">max-width</span>: <span class="number">767.98px</span>) {</span></span><br><span class="line"><span class="language-css">      <span class="selector-class">.content</span> {</span></span><br><span class="line"><span class="language-css">        <span class="attribute">width</span>: <span class="number">94%</span>;</span></span><br><span class="line"><span class="language-css">      }</span></span><br><span class="line"><span class="language-css"></span></span><br><span class="line"><span class="language-css">      <span class="selector-class">.content</span> <span class="selector-class">.logo-img</span> {</span></span><br><span class="line"><span class="language-css">        <span class="attribute">padding-top</span>: <span class="number">120px</span>;</span></span><br><span class="line"><span class="language-css">      }</span></span><br><span class="line"><span class="language-css">    }</span></span><br><span class="line"><span class="language-css">  </span><span class="tag">&lt;/<span class="name">style</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">body</span> <span class="attr">class</span>=<span class="string">"web-font"</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">"goPage"</span> <span class="attr">class</span>=<span class="string">"go-page"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"alert alert-danger go-alert hidden"</span> <span class="attr">role</span>=<span class="string">"alert"</span>&gt;</span></span><br><span class="line">      验证失败</span><br><span class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"content"</span>&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"flex-box"</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"flex-contain"</span>&gt;</span></span><br><span class="line">          <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"logo-img"</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">p</span> <span class="attr">class</span>=<span class="string">"blog-name"</span>&gt;</span>LiuShen's Blog<span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">p</span> <span class="attr">class</span>=<span class="string">"blog-description"</span>&gt;</span><span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line">          <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line">          <span class="comment">&lt;!-- 加载ing... --&gt;</span></span><br><span class="line">          <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"loading-item loading-safe flex"</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">i</span> <span class="attr">class</span>=<span class="string">"iconfont icon-snapchat-fill"</span>&gt;</span><span class="tag">&lt;/<span class="name">i</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"loading-text"</span>&gt;</span>链接安全性检验中 请稍后...<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">          <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line">          <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"go-box"</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"footer flex-footer"</span>&gt;</span></span><br><span class="line">          ©2021-2024</span><br><span class="line">          <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"https://www.qyliu.top"</span> <span class="attr">class</span>=<span class="string">"blog-name"</span>&gt;</span><span class="tag">&lt;<span class="name">span</span>&gt;</span>LiuShen's Blog<span class="tag">&lt;/<span class="name">span</span>&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">          版权所有</span><br><span class="line">          <span class="comment">&lt;!-- &lt;span class="blog-name"&gt;廿壴(ganxb2)&lt;/span&gt; 版权所有 --&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">      <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">  <span class="comment">&lt;!-- goPage end --&gt;</span></span><br><span class="line"></span><br><span class="line">  <span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">"https://lib.baomitu.com/jquery/3.6.0/jquery.min.js"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">"https://lib.baomitu.com/twitter-bootstrap/4.6.1/js/bootstrap.min.js"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">script</span> <span class="attr">type</span>=<span class="string">"module"</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">// 请根据自己博客修改</span></span></span><br><span class="line"><span class="language-javascript">    <span class="keyword">const</span> config = {</span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// 标题</span></span></span><br><span class="line"><span class="language-javascript">      <span class="attr">title</span>:</span></span><br><span class="line"><span class="language-javascript">        <span class="string">"安全中心 | LiuShen's Blog"</span>,</span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// 地址栏图标</span></span></span><br><span class="line"><span class="language-javascript">      <span class="attr">iconFavicon</span>: <span class="string">"https://pic.imgdb.cn/item/65d5a5739f345e8d03290761.png"</span>,</span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// 二维码地址</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// mpImgSrc: "/img/wxgzh.webp",</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// 博客名称</span></span></span><br><span class="line"><span class="language-javascript">      <span class="attr">blogName</span>: <span class="string">"LiuShen's Blog"</span>,</span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// 博客描述</span></span></span><br><span class="line"><span class="language-javascript">      <span class="attr">blogDescription</span>: <span class="string">"柳影曳曳，清酒孤灯，扬笔撒墨，心境如霜"</span>,</span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// 白名单</span></span></span><br><span class="line"><span class="language-javascript">      <span class="attr">safeUrl</span>: [</span></span><br><span class="line"><span class="language-javascript">        <span class="comment">// 平台 常用平台不用改哈</span></span></span><br><span class="line"><span class="language-javascript">        <span class="string">"github.com"</span>,</span></span><br><span class="line"><span class="language-javascript">        <span class="string">"gitee.com"</span>,</span></span><br><span class="line"><span class="language-javascript">        <span class="string">"csdn.net"</span>,</span></span><br><span class="line"><span class="language-javascript">        <span class="string">"zhihu.com"</span>,</span></span><br><span class="line"><span class="language-javascript">        <span class="string">"pan.baidu.com"</span>,</span></span><br><span class="line"><span class="language-javascript">        <span class="string">"baike.baidu.com"</span>,</span></span><br><span class="line"><span class="language-javascript">        <span class="string">"hexo.io"</span>,</span></span><br><span class="line"><span class="language-javascript">        <span class="string">"leancloud.cn"</span>,</span></span><br><span class="line"><span class="language-javascript">        <span class="string">"nodejs.cn"</span>,</span></span><br><span class="line"><span class="language-javascript">        <span class="string">"jsdelivr.com"</span>,</span></span><br><span class="line"><span class="language-javascript">        <span class="string">"ohmyposh.dev"</span>,</span></span><br><span class="line"><span class="language-javascript">        <span class="string">"nerdfonts.com"</span>,</span></span><br><span class="line"><span class="language-javascript">        <span class="string">"douban.com"</span>,</span></span><br><span class="line"><span class="language-javascript">        <span class="string">"waline.js.org"</span>,</span></span><br><span class="line"><span class="language-javascript">        <span class="string">"developer.mozilla.org"</span>,</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">        <span class="comment">// 好友博客 增加自己的博客友链</span></span></span><br><span class="line"><span class="language-javascript">      ],</span></span><br><span class="line"><span class="language-javascript">      <span class="attr">tipsTextError</span>: <span class="string">"链接错误，关闭页面返回本站"</span>,</span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// tipsTextDownload:</span></span></span><br><span class="line"><span class="language-javascript">        <span class="comment">// "从廿壴(ganxb2)微信公众号获取暗号≖‿≖✧ o‿≖✧(๑•̀ㅂ•́)و✧",</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//   "(๑•̀ㅂ•́)و✧“博客”微信公众号关注走一波o‿≖✧",</span></span></span><br><span class="line"><span class="language-javascript">      <span class="attr">tipsTextDanger</span>: <span class="string">"该网址未在确认的安全范围内"</span>,</span></span><br><span class="line"><span class="language-javascript">      <span class="attr">tipsTextSuccess</span>: <span class="string">"该网址在确认的安全范围内"</span>,</span></span><br><span class="line"><span class="language-javascript">      <span class="attr">textDanger</span>:</span></span><br><span class="line"><span class="language-javascript">        <span class="string">"您即将离开博客去往如下网址，请注意您的账号隐私安全和财产安全："</span>,</span></span><br><span class="line"><span class="language-javascript">      <span class="attr">textSuccess</span>: <span class="string">"您即将离开博客去往如下网址"</span>,</span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// 后续改成leancloud获取(下载验证码)</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// wpValidate: "9498",</span></span></span><br><span class="line"><span class="language-javascript">    };</span></span><br><span class="line"><span class="language-javascript">	<span class="comment">// 发送同步AJAX请求</span></span></span><br><span class="line"><span class="language-javascript">	<span class="keyword">const</span> xhr = <span class="keyword">new</span> <span class="title class_">XMLHttpRequest</span>();</span></span><br><span class="line"><span class="language-javascript">	xhr.<span class="title function_">open</span>(<span class="string">'GET'</span>, <span class="string">'friend.json'</span>, <span class="literal">false</span>); <span class="comment">// 第三个参数为 false 表示同步请求</span></span></span><br><span class="line"><span class="language-javascript">	xhr.<span class="title function_">send</span>();</span></span><br><span class="line"><span class="language-javascript">	</span></span><br><span class="line"><span class="language-javascript">	<span class="keyword">if</span> (xhr.<span class="property">status</span> === <span class="number">200</span>) {</span></span><br><span class="line"><span class="language-javascript">	    <span class="keyword">try</span> {</span></span><br><span class="line"><span class="language-javascript">	        <span class="keyword">const</span> friendData = <span class="title class_">JSON</span>.<span class="title function_">parse</span>(xhr.<span class="property">responseText</span>);</span></span><br><span class="line"><span class="language-javascript">	        <span class="keyword">const</span> safeUrls = friendData.<span class="property">friends</span>.<span class="title function_">map</span>(<span class="function"><span class="params">friend</span> =&gt;</span> {</span></span><br><span class="line"><span class="language-javascript">	            <span class="keyword">let</span> url = friend[<span class="number">1</span>];</span></span><br><span class="line"><span class="language-javascript">	            url = url.<span class="title function_">replace</span>(<span class="regexp">/\/$/</span>, <span class="string">''</span>); <span class="comment">// 移除结尾斜杠 "/"</span></span></span><br><span class="line"><span class="language-javascript">	            url = url.<span class="title function_">replace</span>(<span class="regexp">/^https?:\/\//</span>, <span class="string">''</span>); <span class="comment">// 移除http://或https://</span></span></span><br><span class="line"><span class="language-javascript">	            <span class="keyword">return</span> url;</span></span><br><span class="line"><span class="language-javascript">	        }); <span class="comment">// 提取友链的链接部分</span></span></span><br><span class="line"><span class="language-javascript">	        <span class="comment">// 更新config对象中的safeUrl数组</span></span></span><br><span class="line"><span class="language-javascript">	        config.<span class="property">safeUrl</span> = config.<span class="property">safeUrl</span>.<span class="title function_">concat</span>(safeUrls);</span></span><br><span class="line"><span class="language-javascript">	        <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">'safeUrl已成功更新:'</span>, config.<span class="property">safeUrl</span>);</span></span><br><span class="line"><span class="language-javascript">	        </span></span><br><span class="line"><span class="language-javascript">	        <span class="comment">// 在数据加载完成后执行其他操作</span></span></span><br><span class="line"><span class="language-javascript">	        <span class="comment">// 可以调用 goInit(config) 函数等</span></span></span><br><span class="line"><span class="language-javascript">	        <span class="title function_">goInit</span>(config);</span></span><br><span class="line"><span class="language-javascript">	    } <span class="keyword">catch</span> (error) {</span></span><br><span class="line"><span class="language-javascript">	        <span class="variable language_">console</span>.<span class="title function_">error</span>(<span class="string">'解析JSON数据出错:'</span>, error);</span></span><br><span class="line"><span class="language-javascript">	    }</span></span><br><span class="line"><span class="language-javascript">	} <span class="keyword">else</span> {</span></span><br><span class="line"><span class="language-javascript">	    <span class="variable language_">console</span>.<span class="title function_">error</span>(<span class="string">'加载文件失败:'</span>, xhr.<span class="property">statusText</span>);</span></span><br><span class="line"><span class="language-javascript">	}</span></span><br><span class="line"><span class="language-javascript">	<span class="comment">// // 使用AJAX加载friend.json文件</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//    const xhr = new XMLHttpRequest();</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//    xhr.open('GET', 'friend.json', true);</span></span></span><br><span class="line"><span class="language-javascript">	<span class="comment">// // console.log(xhr);</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//    xhr.onload = function () {</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//        if (xhr.status === 200) {</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//            try {</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//                const friendData = JSON.parse(xhr.responseText);</span></span></span><br><span class="line"><span class="language-javascript">				</span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//                const safeUrls = friendData.friends.map(friend =&gt; {</span></span></span><br><span class="line"><span class="language-javascript">	<span class="comment">// 				let url = friend[1];</span></span></span><br><span class="line"><span class="language-javascript">	<span class="comment">// 				url = url.replace(/\/$/, ''); // 移除结尾斜杠 "/"</span></span></span><br><span class="line"><span class="language-javascript">	<span class="comment">// 			    url = url.replace(/^https?:\/\//, ''); // 移除http://或https://</span></span></span><br><span class="line"><span class="language-javascript">	<span class="comment">// 			    return url;</span></span></span><br><span class="line"><span class="language-javascript">	<span class="comment">// 			}); // 提取友链的链接部分</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//                // 更新config对象中的safeUrl数组</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//                config.safeUrl = config.safeUrl.concat(safeUrls);</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//                console.log('safeUrl已成功更新:', config.safeUrl);</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//            } catch (error) {</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//                console.error('解析JSON数据出错:', error);</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//            }</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//        } else {</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//            console.error('加载文件失败:', xhr.statusText);</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//        }</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//    };</span></span></span><br><span class="line"><span class="language-javascript"> <span class="comment">//    xhr.send();</span></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">// 获取地址和下载标识</span></span></span><br><span class="line"><span class="language-javascript">    <span class="keyword">const</span> <span class="title function_">getQueryString</span> = (<span class="params">name, type</span>) =&gt; {</span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// 构造一个含有目标参数的正则表达式对象</span></span></span><br><span class="line"><span class="language-javascript">      <span class="keyword">let</span> reg = <span class="keyword">new</span> <span class="title class_">RegExp</span>(<span class="string">"(^|&amp;)"</span> + name + <span class="string">"=([^&amp;]*)(&amp;|$)"</span>),</span></span><br><span class="line"><span class="language-javascript">        regDown = <span class="keyword">new</span> <span class="title class_">RegExp</span>(<span class="string">"&amp;type="</span> + type),</span></span><br><span class="line"><span class="language-javascript">        <span class="comment">// 匹配地址参数</span></span></span><br><span class="line"><span class="language-javascript">        r = <span class="variable language_">window</span>.<span class="property">location</span>.<span class="property">search</span>.<span class="title function_">substr</span>(<span class="number">1</span>).<span class="title function_">match</span>(reg),</span></span><br><span class="line"><span class="language-javascript">        d = <span class="variable language_">window</span>.<span class="property">location</span>.<span class="property">search</span>.<span class="title function_">substr</span>(<span class="number">1</span>).<span class="title function_">match</span>(regDown),</span></span><br><span class="line"><span class="language-javascript">        isDownload = <span class="literal">false</span>;</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// 反编译回原地址 取第3个值，不然就返回 Null</span></span></span><br><span class="line"><span class="language-javascript">      <span class="keyword">if</span> (r !== <span class="literal">null</span>) {</span></span><br><span class="line"><span class="language-javascript">        <span class="comment">// 如果d不为空，则显示下载提示</span></span></span><br><span class="line"><span class="language-javascript">        <span class="keyword">if</span> (d !== <span class="literal">null</span>) {</span></span><br><span class="line"><span class="language-javascript">          isDownload = <span class="literal">true</span>;</span></span><br><span class="line"><span class="language-javascript">        }</span></span><br><span class="line"><span class="language-javascript">        <span class="keyword">return</span> { <span class="attr">url</span>: <span class="built_in">decodeURIComponent</span>(r[<span class="number">2</span>]), <span class="attr">isDownload</span>: isDownload };</span></span><br><span class="line"><span class="language-javascript">      }</span></span><br><span class="line"><span class="language-javascript">      <span class="keyword">return</span> <span class="literal">null</span>;</span></span><br><span class="line"><span class="language-javascript">    };</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">// xss攻击（绑定值时使用）</span></span></span><br><span class="line"><span class="language-javascript">    <span class="keyword">const</span> <span class="title function_">xssCheck</span> = (<span class="params">str, reg</span>) =&gt; {</span></span><br><span class="line"><span class="language-javascript">      <span class="keyword">return</span> str</span></span><br><span class="line"><span class="language-javascript">        ? str.<span class="title function_">replace</span>(</span></span><br><span class="line"><span class="language-javascript">          reg || <span class="regexp">/[&amp;&lt;"&gt;'](?:(amp|lt|quot|gt|#39|nbsp|#\d+);)?/g</span>,</span></span><br><span class="line"><span class="language-javascript">          <span class="keyword">function</span> (<span class="params">a, b</span>) {</span></span><br><span class="line"><span class="language-javascript">            <span class="keyword">if</span> (b) {</span></span><br><span class="line"><span class="language-javascript">              <span class="keyword">return</span> a;</span></span><br><span class="line"><span class="language-javascript">            } <span class="keyword">else</span> {</span></span><br><span class="line"><span class="language-javascript">              <span class="keyword">return</span> {</span></span><br><span class="line"><span class="language-javascript">                <span class="string">"&lt;"</span>: <span class="string">"&amp;lt;"</span>,</span></span><br><span class="line"><span class="language-javascript">                <span class="string">"&amp;"</span>: <span class="string">"&amp;amp;"</span>,</span></span><br><span class="line"><span class="language-javascript">                <span class="string">'"'</span>: <span class="string">"&amp;quot;"</span>,</span></span><br><span class="line"><span class="language-javascript">                <span class="string">"&gt;"</span>: <span class="string">"&amp;gt;"</span>,</span></span><br><span class="line"><span class="language-javascript">                <span class="string">"'"</span>: <span class="string">"&amp;#39;"</span>,</span></span><br><span class="line"><span class="language-javascript">              }[a];</span></span><br><span class="line"><span class="language-javascript">            }</span></span><br><span class="line"><span class="language-javascript">          }</span></span><br><span class="line"><span class="language-javascript">        )</span></span><br><span class="line"><span class="language-javascript">        : <span class="string">""</span>;</span></span><br><span class="line"><span class="language-javascript">    };</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">// 下载按钮点击验证，成功回调把linkUrl绑定给隐藏的a标签模拟点击</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">// const downloadValidate = (config, getLinkUrl) =&gt; {</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//   // 下载按钮，下载地址，验证码，警告框</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//   const downloadBtn = document.querySelector(".go-down-btn"),</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//     downloadUrl = document.querySelector(".go-down-url"),</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//     wpValidate = document.querySelector(".wp-validate"),</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//     goAlert = document.querySelector(".go-alert");</span></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//   downloadBtn.addEventListener(</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//     "click",</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//     function () {</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//       // 显示alert</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//       goAlert.classList.remove("hidden", "alertFadeInUp");</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//       setTimeout(() =&gt; {</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//         goAlert.classList.add("alertFadeInUp");</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//       }, 300);</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//       // 暂时给默认值下载后续再改动</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//       wpValidate.value = "9498";</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//       // leancloud回调(node环境则可以利用主机环境变量传入leancloud的参数)</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//       if (</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//         wpValidate &amp;&amp;</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//         wpValidate.value !== "" &amp;&amp;</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//         wpValidate.value === config.wpValidate</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//       ) {</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//         // 成功</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//         wpValidate.classList.remove("is-invalid");</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//         wpValidate.classList.add("is-valid");</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//         goAlert.classList.remove("alert-danger");</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//         goAlert.classList.add("alert-success");</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//         goAlert.textContent = "验证成功";</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//         downloadUrl.click();</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//       } else {</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//         // 失败</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//         wpValidate.classList.remove("is-valid");</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//         wpValidate.classList.add("is-invalid");</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//         goAlert.classList.remove("alert-success");</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//         goAlert.classList.add("alert-danger");</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//         goAlert.textContent = "验证失败";</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//       }</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//     },</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//     !1</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//   );</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//   // !1 false 冒泡 是点击子元素，子元素事件先出现在出现父元素事件</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">//   // 1 true 捕获 是点击子元素，父元素事件先出现在出现子元素事件</span></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">// };</span></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">// 其他地址校验白名单</span></span></span><br><span class="line"><span class="language-javascript">    <span class="keyword">const</span> <span class="title function_">othersValidate</span> = (<span class="params">config, getLinkUrl</span>) =&gt; {</span></span><br><span class="line"><span class="language-javascript">      <span class="keyword">let</span> isSafeUrl = <span class="literal">false</span>,</span></span><br><span class="line"><span class="language-javascript">        safeUrl = config.<span class="property">safeUrl</span>,</span></span><br><span class="line"><span class="language-javascript">        url = <span class="title function_">xssCheck</span>(getLinkUrl.<span class="property">url</span>);</span></span><br><span class="line"><span class="language-javascript">		<span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">"shuchuchuchcu"</span>, safeUrl)</span></span><br><span class="line"><span class="language-javascript">		<span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">"shuchuchuchcu"</span>, url)</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">      <span class="keyword">if</span> (safeUrl.<span class="property">length</span> !== <span class="number">0</span>) {</span></span><br><span class="line"><span class="language-javascript">        <span class="keyword">for</span> (<span class="keyword">let</span> i = <span class="number">0</span>; i &lt; safeUrl.<span class="property">length</span>; i++) {</span></span><br><span class="line"><span class="language-javascript">          <span class="keyword">const</span> ele = safeUrl[i];</span></span><br><span class="line"><span class="language-javascript">          <span class="keyword">if</span> (url.<span class="title function_">includes</span>(ele) </span></span><br><span class="line"><span class="language-javascript">		  || url.<span class="title function_">includes</span>(ele + <span class="string">'/'</span>) </span></span><br><span class="line"><span class="language-javascript">		  || url.<span class="title function_">includes</span>(<span class="string">'https://'</span> + ele)</span></span><br><span class="line"><span class="language-javascript">		  || url.<span class="title function_">includes</span>(<span class="string">'https://'</span> + ele + <span class="string">'/'</span>)</span></span><br><span class="line"><span class="language-javascript">		  || url.<span class="title function_">includes</span>(<span class="string">'http://'</span> + ele)</span></span><br><span class="line"><span class="language-javascript">		  || url.<span class="title function_">includes</span>(<span class="string">'http://'</span> + ele + <span class="string">'/'</span>)) {</span></span><br><span class="line"><span class="language-javascript">            isSafeUrl = <span class="literal">true</span>;</span></span><br><span class="line"><span class="language-javascript">            <span class="keyword">break</span>;</span></span><br><span class="line"><span class="language-javascript">          }</span></span><br><span class="line"><span class="language-javascript">        }</span></span><br><span class="line"><span class="language-javascript">      }</span></span><br><span class="line"><span class="language-javascript">      <span class="keyword">return</span> isSafeUrl;</span></span><br><span class="line"><span class="language-javascript">    };</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">// 模版基础配置初始</span></span></span><br><span class="line"><span class="language-javascript">    <span class="keyword">const</span> <span class="title function_">goInit</span> = (<span class="params">config</span>) =&gt; {</span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// $(function () {</span></span></span><br><span class="line"><span class="language-javascript">      <span class="keyword">const</span> tplConfig = {</span></span><br><span class="line"><span class="language-javascript">        <span class="attr">loadingType</span>: <span class="string">"loading-error"</span>,</span></span><br><span class="line"><span class="language-javascript">        <span class="attr">tipType</span>: <span class="string">"tip3"</span>,</span></span><br><span class="line"><span class="language-javascript">        <span class="attr">tipsText</span>: config.<span class="property">tipsTextError</span>,</span></span><br><span class="line"><span class="language-javascript">        <span class="attr">loadingTopicText</span>: config.<span class="property">textDanger</span>,</span></span><br><span class="line"><span class="language-javascript">        <span class="attr">loadingColorType</span>: <span class="string">"loading-color2"</span>,</span></span><br><span class="line"><span class="language-javascript">        <span class="attr">goUrl</span>: <span class="string">"/"</span>,</span></span><br><span class="line"><span class="language-javascript">      },</span></span><br><span class="line"><span class="language-javascript">        getLinkUrl = <span class="title function_">getQueryString</span>(<span class="string">"goUrl"</span>, <span class="string">"goDown"</span>),</span></span><br><span class="line"><span class="language-javascript">        loadingSafe = <span class="variable language_">document</span>.<span class="title function_">querySelector</span>(<span class="string">".loading-safe"</span>),</span></span><br><span class="line"><span class="language-javascript">        goBox = <span class="variable language_">document</span>.<span class="title function_">querySelector</span>(<span class="string">".go-box"</span>),</span></span><br><span class="line"><span class="language-javascript">        title = <span class="variable language_">document</span>.<span class="title function_">querySelector</span>(<span class="string">"title"</span>),</span></span><br><span class="line"><span class="language-javascript">        iconFavicon = <span class="variable language_">document</span>.<span class="title function_">querySelector</span>(<span class="string">".icon-favicon"</span>),</span></span><br><span class="line"><span class="language-javascript">        blogName = <span class="variable language_">document</span>.<span class="title function_">querySelectorAll</span>(<span class="string">".blog-name"</span>),</span></span><br><span class="line"><span class="language-javascript">        blogDescription = <span class="variable language_">document</span>.<span class="title function_">querySelector</span>(<span class="string">".blog-description"</span>);</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// 初始化：标题，favicon，博客名称，博客描述</span></span></span><br><span class="line"><span class="language-javascript">      title.<span class="property">textContent</span> = config.<span class="property">title</span>;</span></span><br><span class="line"><span class="language-javascript">      iconFavicon.<span class="title function_">setAttribute</span>(<span class="string">"href"</span>, config.<span class="property">iconFavicon</span>);</span></span><br><span class="line"><span class="language-javascript">      blogName.<span class="title function_">forEach</span>(<span class="function">(<span class="params">element</span>) =&gt;</span> {</span></span><br><span class="line"><span class="language-javascript">        element.<span class="property">textContent</span> = config.<span class="property">blogName</span>;</span></span><br><span class="line"><span class="language-javascript">      });</span></span><br><span class="line"><span class="language-javascript">      blogDescription.<span class="property">textContent</span> = config.<span class="property">blogDescription</span>;</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// 根据地址栏参数判断是下载地址还是纯外链，外链则直接修改a标签按钮url，用户点击跳转</span></span></span><br><span class="line"><span class="language-javascript">      <span class="keyword">if</span> (getLinkUrl) {</span></span><br><span class="line"><span class="language-javascript">        <span class="comment">// 可参考csdn加入后端请求验证地址是否白名单再进一步给出不同场景状态：是白名单，则绿+蓝，否则黄+红</span></span></span><br><span class="line"><span class="language-javascript">        <span class="keyword">const</span> isSafeUrl = <span class="title function_">othersValidate</span>(config, getLinkUrl);</span></span><br><span class="line"><span class="language-javascript">        tplConfig.<span class="property">loadingType</span> = <span class="string">"loading-others"</span>;</span></span><br><span class="line"><span class="language-javascript">        tplConfig.<span class="property">goUrl</span> = <span class="title function_">xssCheck</span>(getLinkUrl.<span class="property">url</span>);</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">        <span class="keyword">if</span> (isSafeUrl) {</span></span><br><span class="line"><span class="language-javascript">          tplConfig.<span class="property">tipType</span> = <span class="string">"tip1"</span>;</span></span><br><span class="line"><span class="language-javascript">          tplConfig.<span class="property">tipsText</span> = config.<span class="property">tipsTextSuccess</span>;</span></span><br><span class="line"><span class="language-javascript">          tplConfig.<span class="property">loadingTopicText</span> = config.<span class="property">textSuccess</span>;</span></span><br><span class="line"><span class="language-javascript">          tplConfig.<span class="property">loadingColorType</span> = <span class="string">"loading-color1"</span>;</span></span><br><span class="line"><span class="language-javascript">          <span class="comment">// 白名单链接直接跳转</span></span></span><br><span class="line"><span class="language-javascript">          <span class="built_in">setTimeout</span>(<span class="function">() =&gt;</span> {</span></span><br><span class="line"><span class="language-javascript">            <span class="comment">// location.assign(tplConfig.goUrl);</span></span></span><br><span class="line"><span class="language-javascript">            <span class="keyword">const</span> goUrlBtn = <span class="variable language_">document</span>.<span class="title function_">querySelector</span>(<span class="string">".go-url-btn"</span>);</span></span><br><span class="line"><span class="language-javascript">            goUrlBtn.<span class="title function_">click</span>();</span></span><br><span class="line"><span class="language-javascript">          }, <span class="number">2000</span>);</span></span><br><span class="line"><span class="language-javascript">          <span class="comment">// location.reload();</span></span></span><br><span class="line"><span class="language-javascript">          <span class="comment">// location.replace();</span></span></span><br><span class="line"><span class="language-javascript">        } <span class="keyword">else</span> {</span></span><br><span class="line"><span class="language-javascript">          tplConfig.<span class="property">tipType</span> = <span class="string">"tip2"</span>;</span></span><br><span class="line"><span class="language-javascript">          tplConfig.<span class="property">tipsText</span> = config.<span class="property">tipsTextDanger</span>;</span></span><br><span class="line"><span class="language-javascript">          tplConfig.<span class="property">loadingTopicText</span> = config.<span class="property">textDanger</span>;</span></span><br><span class="line"><span class="language-javascript">          tplConfig.<span class="property">loadingColorType</span> = <span class="string">"loading-color2"</span>;</span></span><br><span class="line"><span class="language-javascript">        }</span></span><br><span class="line"><span class="language-javascript">      }</span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// 如果是下载则按钮事件绑定leancloud请求校验验证码</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// else if (getLinkUrl &amp;&amp; getLinkUrl.isDownload) {</span></span></span><br><span class="line"><span class="language-javascript">        <span class="comment">// tplConfig.loadingType = "loading-download";</span></span></span><br><span class="line"><span class="language-javascript">        <span class="comment">// tplConfig.goUrl = xssCheck(getLinkUrl.url);</span></span></span><br><span class="line"><span class="language-javascript">        <span class="comment">// tplConfig.tipType = "tip1";</span></span></span><br><span class="line"><span class="language-javascript">        <span class="comment">// tplConfig.tipsText = config.tipsTextDownload;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// } </span></span></span><br><span class="line"><span class="language-javascript">	  <span class="keyword">else</span> {</span></span><br><span class="line"><span class="language-javascript">        <span class="comment">// 错误</span></span></span><br><span class="line"><span class="language-javascript">        tplConfig.<span class="property">tipType</span> = <span class="string">"tip2"</span>;</span></span><br><span class="line"><span class="language-javascript">        tplConfig.<span class="property">tipsText</span> = config.<span class="property">tipsTextError</span>;</span></span><br><span class="line"><span class="language-javascript">      }</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">      <span class="keyword">const</span> othersTpl = <span class="string">`</span></span></span><br><span class="line"><span class="string"><span class="language-javascript">          &lt;div class="loading-topic"&gt;</span></span></span><br><span class="line"><span class="string"><span class="language-javascript">            &lt;span</span></span></span><br><span class="line"><span class="string"><span class="language-javascript">              &gt;<span class="subst">${tplConfig.loadingTopicText}</span>&lt;/span</span></span></span><br><span class="line"><span class="string"><span class="language-javascript">            &gt;</span></span></span><br><span class="line"><span class="string"><span class="language-javascript">            &lt;a class="<span class="subst">${tplConfig.loadingColorType}</span> go-url"&gt;<span class="subst">${tplConfig.goUrl}</span>&lt;/a&gt;</span></span></span><br><span class="line"><span class="string"><span class="language-javascript">          &lt;/div&gt;</span></span></span><br><span class="line"><span class="string"><span class="language-javascript">          &lt;div class="flex-end"&gt;</span></span></span><br><span class="line"><span class="string"><span class="language-javascript">            &lt;a rel="noopener external nofollow noreferrer" class="loading-btn go-url-btn" href="<span class="subst">${tplConfig.goUrl}</span>" target="_self"&gt;继续&lt;/a&gt;</span></span></span><br><span class="line"><span class="string"><span class="language-javascript">          &lt;/div&gt;</span></span></span><br><span class="line"><span class="string"><span class="language-javascript">        `</span>;</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// const downloadTpl = `</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//     &lt;div class="loading-topic"&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//       &lt;div class="flex"&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//         &lt;div class="mp-img-box"&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//           &lt;img class="mp-img" src="${config.mpImgSrc}" alt="qrcode" /&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//           &lt;p&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//             LiuShen's Blog&lt;br&gt;</span></span></span><br><span class="line"><span class="language-javascript">						<span class="comment">// 柳影曳曳，清酒孤灯，扬笔撒墨，心境如霜</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//           &lt;/p&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//         &lt;/div&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//         &lt;div&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//           &lt;form class="needs-validation form-inline"&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//             &lt;div class="form-group"&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//               &lt;label class="sr-only" for="wp-validate"&gt;验证码&lt;/label&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//               &lt;input</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//                 type="text"</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//                 class="form-control wp-validate hidden"</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//                 id="wp-validate"</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//                 placeholder="请输入公众号验证码..."</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//               /&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//               &lt;input type="text" class="form-control hidden" /&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//             &lt;/div&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//           &lt;/form&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//           &lt;a rel="noopener external nofollow noreferrer" href="${tplConfig.goUrl}" class="go-down-url hidden" target="_self" tittle="go-url"&gt;&lt;/a&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//         &lt;/div&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//       &lt;/div&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//     &lt;/div&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//     &lt;div class="flex-end"&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//       &lt;a</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//         class="loading-btn go-down-btn"</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//         href="javascript:void(0);"</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//         target="_self"</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//         &gt;下载&lt;/a</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//       &gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//     &lt;/div&gt;</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//   `;</span></span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">      <span class="keyword">const</span> tpl = <span class="string">`</span></span></span><br><span class="line"><span class="string"><span class="language-javascript">          &lt;div class="loading-item <span class="subst">${tplConfig.loadingType}</span> hidden"&gt;</span></span></span><br><span class="line"><span class="string"><span class="language-javascript">            &lt;div class="flex loading-tip <span class="subst">${tplConfig.tipType}</span>"&gt;</span></span></span><br><span class="line"><span class="string"><span class="language-javascript">              &lt;i class="iconfont icon-snapchat-fill <span class="subst">${tplConfig.loadingType === <span class="string">"loading-download"</span> &amp;&amp; <span class="string">"hidden"</span></span></span></span></span><br><span class="line"><span class="subst"><span class="string"><span class="language-javascript">        }</span>"&gt;&lt;/i&gt;</span></span></span><br><span class="line"><span class="string"><span class="language-javascript">              &lt;div class="loading-text"&gt;</span></span></span><br><span class="line"><span class="string"><span class="language-javascript">                <span class="subst">${tplConfig.tipsText}</span></span></span></span><br><span class="line"><span class="string"><span class="language-javascript">              &lt;/div&gt;</span></span></span><br><span class="line"><span class="string"><span class="language-javascript">            &lt;/div&gt;</span></span></span><br><span class="line"><span class="string"><span class="language-javascript">            <span class="subst">${tplConfig.loadingType === <span class="string">"loading-others"</span></span></span></span></span><br><span class="line"><span class="subst"><span class="string"><span class="language-javascript">          ? othersTpl</span></span></span></span><br><span class="line"><span class="subst"><span class="string"><span class="language-javascript">          // : tplConfig.loadingType === <span class="string">"loading-download"</span></span></span></span></span><br><span class="line"><span class="subst"><span class="string"><span class="language-javascript">          //   ? downloadTpl</span></span></span></span><br><span class="line"><span class="subst"><span class="string"><span class="language-javascript">            : <span class="string">""</span></span></span></span></span><br><span class="line"><span class="subst"><span class="string"><span class="language-javascript">        }</span></span></span></span><br><span class="line"><span class="string"><span class="language-javascript">          &lt;/div&gt;</span></span></span><br><span class="line"><span class="string"><span class="language-javascript">        `</span>;</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// tpl渲染</span></span></span><br><span class="line"><span class="language-javascript">      goBox.<span class="property">innerHTML</span> = tpl;</span></span><br><span class="line"><span class="language-javascript">      <span class="keyword">const</span> loadingItem = <span class="variable language_">document</span>.<span class="title function_">querySelector</span>(<span class="string">".go-box .loading-item"</span>);</span></span><br><span class="line"><span class="language-javascript">      loadingSafe.<span class="property">classList</span>.<span class="title function_">add</span>(<span class="string">"fadeOutUp"</span>, <span class="string">"fade-animate"</span>);</span></span><br><span class="line"><span class="language-javascript">      loadingItem.<span class="property">classList</span>.<span class="title function_">remove</span>(<span class="string">"hidden"</span>);</span></span><br><span class="line"><span class="language-javascript">      loadingItem.<span class="property">classList</span>.<span class="title function_">add</span>(<span class="string">"fadeInUp"</span>, <span class="string">"fade-animate"</span>);</span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// 下载按钮事件绑定</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// if (getLinkUrl &amp;&amp; getLinkUrl.isDownload)</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">//   downloadValidate(config, getLinkUrl);</span></span></span><br><span class="line"><span class="language-javascript">      <span class="comment">// });</span></span></span><br><span class="line"><span class="language-javascript">    };</span></span><br><span class="line"><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">    <span class="comment">// -----------------------调用 start 栗子：?goUrl=https%3A%2F%2Fimgod.me&amp;type=goDown</span></span></span><br><span class="line"><span class="language-javascript">    <span class="title function_">goInit</span>(config);</span></span><br><span class="line"><span class="language-javascript">  </span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></tbody></table></figure><p>如果只想部署，到这里就可以结束了，下面讲解的是其中的我修改的项，首先就是屏蔽了一堆的下载单独跳转到另外的页面，让他可以功能更加单一（当然如果有需要可以尝试着自己修改为自己的，我这里不需要），如果你们也想要部署需要修改其中的config为你们自己的，如下：</p><figure class="highlight javascript"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">const</span> config = {</span><br><span class="line">      <span class="comment">// 标题</span></span><br><span class="line">      <span class="attr">title</span>:</span><br><span class="line">        <span class="string">"安全中心 | LiuShen's Blog"</span>,</span><br><span class="line">      <span class="comment">// 地址栏图标</span></span><br><span class="line">      <span class="attr">iconFavicon</span>: <span class="string">"https://pic.imgdb.cn/item/65d5a5739f345e8d03290761.png"</span>,</span><br><span class="line">      <span class="comment">// 二维码地址</span></span><br><span class="line">      <span class="comment">// mpImgSrc: "/img/wxgzh.webp",</span></span><br><span class="line">      <span class="comment">// 博客名称</span></span><br><span class="line">      <span class="attr">blogName</span>: <span class="string">"LiuShen's Blog"</span>,</span><br><span class="line">      <span class="comment">// 博客描述</span></span><br><span class="line">      <span class="attr">blogDescription</span>: <span class="string">"柳影曳曳，清酒孤灯，扬笔撒墨，心境如霜"</span>,</span><br><span class="line">      <span class="comment">// 白名单</span></span><br><span class="line">      <span class="attr">safeUrl</span>: [</span><br><span class="line">        <span class="comment">// 平台 常用平台不用改哈</span></span><br><span class="line">        <span class="string">"github.com"</span>,</span><br><span class="line">        <span class="string">"gitee.com"</span>,</span><br><span class="line">        <span class="string">"csdn.net"</span>,</span><br><span class="line">        <span class="string">"zhihu.com"</span>,</span><br><span class="line">        <span class="string">"pan.baidu.com"</span>,</span><br><span class="line">        <span class="string">"baike.baidu.com"</span>,</span><br><span class="line">        <span class="string">"hexo.io"</span>,</span><br><span class="line">        <span class="string">"leancloud.cn"</span>,</span><br><span class="line">        <span class="string">"nodejs.cn"</span>,</span><br><span class="line">        <span class="string">"jsdelivr.com"</span>,</span><br><span class="line">        <span class="string">"ohmyposh.dev"</span>,</span><br><span class="line">        <span class="string">"nerdfonts.com"</span>,</span><br><span class="line">        <span class="string">"douban.com"</span>,</span><br><span class="line">        <span class="string">"waline.js.org"</span>,</span><br><span class="line">        <span class="string">"developer.mozilla.org"</span>,</span><br><span class="line"></span><br><span class="line">        <span class="comment">// 好友博客 增加自己的博客友链</span></span><br><span class="line">      ],</span><br><span class="line">      <span class="attr">tipsTextError</span>: <span class="string">"链接错误，关闭页面返回本站"</span>,</span><br><span class="line">      <span class="comment">// tipsTextDownload:</span></span><br><span class="line">        <span class="comment">// "从廿壴(ganxb2)微信公众号获取暗号≖‿≖✧ o‿≖✧(๑•̀ㅂ•́)و✧",</span></span><br><span class="line">      <span class="comment">//   "(๑•̀ㅂ•́)و✧“博客”微信公众号关注走一波o‿≖✧",</span></span><br><span class="line">      <span class="attr">tipsTextDanger</span>: <span class="string">"该网址未在确认的安全范围内"</span>,</span><br><span class="line">      <span class="attr">tipsTextSuccess</span>: <span class="string">"该网址在确认的安全范围内"</span>,</span><br><span class="line">      <span class="attr">textDanger</span>:</span><br><span class="line">        <span class="string">"您即将离开博客去往如下网址，请注意您的账号隐私安全和财产安全："</span>,</span><br><span class="line">      <span class="attr">textSuccess</span>: <span class="string">"您即将离开博客去往如下网址"</span>,</span><br><span class="line">      <span class="comment">// 后续改成leancloud获取(下载验证码)</span></span><br><span class="line">      <span class="comment">// wpValidate: "9498",</span></span><br><span class="line">    };</span><br></pre></td></tr></tbody></table></figure><p>还有网页头的部分信息，这个比较简单所以就不读了，下面，针对于文章部分的内容，我经常使用到朋友们的链接在文章中，但是如果都报不安全，那不是有点离谱了吗，所以我想设置一下友链区域的链接可以识别为安全并直接跳转。我们注意到config中有一个safeurl，这个就是安全页面，当识别到安全页面的时候，链接会自动跳转，如下：</p><p><img src="" data-lazy-src="https://p.liiiu.cn/i/2024/03/21/65fb868523899.png" alt="左边为安全页面，会自动跳转，右边为未知页面，需要确认"></p><p>但是经过检查，原作者的友链需要自己手动添加，这对于我一个蓝狗，不可能，绝对不可能！于是我尝试了读取我的友链信息，恰好我的根目录下有一个friend.json，格式如下：</p><figure class="highlight json"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="punctuation">{</span></span><br><span class="line">  <span class="attr">"friends"</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line">    <span class="punctuation">[</span></span><br><span class="line">      <span class="string">"LiuShen"</span><span class="punctuation">,</span></span><br><span class="line">      <span class="string">"https://www.qyliu.top/"</span><span class="punctuation">,</span></span><br><span class="line">      <span class="string">"https://pic.imgdb.cn/item/65d5a5739f345e8d03290761.png"</span></span><br><span class="line">    <span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line">    <span class="punctuation">[</span></span><br><span class="line">      <span class="string">"Yu Sir"</span><span class="punctuation">,</span></span><br><span class="line">      <span class="string">"https://gaoyuyugao.github.io"</span><span class="punctuation">,</span></span><br><span class="line">      <span class="string">"https://pic.imgdb.cn/item/65d89afa9f345e8d03e395e2.png"</span></span><br><span class="line">    <span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line">      ……</span><br><span class="line"><span class="punctuation">}</span></span><br></pre></td></tr></tbody></table></figure><p>其中是我的友链和相关头像链接信息，这个文件是为了构建友链朋友圈而使用，由于我魔改了友链页导致原有的友链朋友圈无法通过标签爬取到我的友链信息，没办法，只能根据其开发文档使用了第一条通用规则，自行生成json文件并上传，每次刷新从这里面读取最新的内容一个个爬取才能成功获取到大家的最新文章，我太难了~，获取到这个friend.json的文件如下：</p><figure class="highlight javascript"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">const</span> <span class="variable constant_">YML</span> = <span class="built_in">require</span>(<span class="string">'yamljs'</span>);</span><br><span class="line"><span class="keyword">const</span> fs = <span class="built_in">require</span>(<span class="string">'fs'</span>);</span><br><span class="line"><span class="keyword">let</span> friends = [],</span><br><span class="line">    data_f = <span class="variable constant_">YML</span>.<span class="title function_">parse</span>(fs.<span class="title function_">readFileSync</span>(<span class="string">'source/_data/link.yml'</span>).<span class="title function_">toString</span>().<span class="title function_">replace</span>(<span class="regexp">/(?&lt;=rss:)\s*\n/g</span>, <span class="string">' ""\n'</span>));</span><br><span class="line">data_f.<span class="title function_">forEach</span>(<span class="function">(<span class="params">entry, index</span>) =&gt;</span> {</span><br><span class="line">    <span class="keyword">let</span> lastIndex = data_f.<span class="property">length</span> - <span class="number">3</span>;  <span class="comment">// 获取友链数组的范围（除了最后，前面的都获取）</span></span><br><span class="line">    <span class="keyword">if</span> (index &lt; lastIndex) {</span><br><span class="line">        friends = friends.<span class="title function_">concat</span>(entry.<span class="property">link_list</span>);</span><br><span class="line">    }</span><br><span class="line">});</span><br><span class="line"><span class="comment">// 根据规定的格式构建 JSON 数据</span></span><br><span class="line"><span class="keyword">const</span> friendData = {</span><br><span class="line">    <span class="attr">friends</span>: friends.<span class="title function_">map</span>(<span class="function"><span class="params">item</span> =&gt;</span> {</span><br><span class="line">        <span class="keyword">return</span> [item.<span class="property">name</span>, item.<span class="property">link</span>, item.<span class="property">avatar</span>];</span><br><span class="line">    })</span><br><span class="line">};</span><br><span class="line"><span class="comment">// 将 JSON 对象转换为字符串</span></span><br><span class="line"><span class="keyword">const</span> friendJSON = <span class="title class_">JSON</span>.<span class="title function_">stringify</span>(friendData, <span class="literal">null</span>, <span class="number">2</span>);</span><br><span class="line"><span class="comment">// 写入 friend.json 文件</span></span><br><span class="line">fs.<span class="title function_">writeFileSync</span>(<span class="string">'./source/friend.json'</span>, friendJSON);</span><br><span class="line"><span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">'friend.json 文件已生成。'</span>);</span><br></pre></td></tr></tbody></table></figure><p>创建link.js，放入上面的内容并放到根目录下，根据[blogroot]/source/_data/link.yml爬取友链信息，所以该方法应该只能用于极少数类butterfly主题！！！</p><p>生成了friend.json之后，我们就根据读取并生成新的safeurl列表，首先我使用的是AJAX异步加载：</p><figure class="highlight javascript"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// // 使用AJAX加载friend.json文件</span></span><br><span class="line"> <span class="comment">//    const xhr = new XMLHttpRequest();</span></span><br><span class="line"> <span class="comment">//    xhr.open('GET', 'friend.json', true);</span></span><br><span class="line">	<span class="comment">// // console.log(xhr);</span></span><br><span class="line"> <span class="comment">//    xhr.onload = function () {</span></span><br><span class="line"> <span class="comment">//        if (xhr.status === 200) {</span></span><br><span class="line"> <span class="comment">//            try {</span></span><br><span class="line"> <span class="comment">//                const friendData = JSON.parse(xhr.responseText);</span></span><br><span class="line">				</span><br><span class="line"> <span class="comment">//                const safeUrls = friendData.friends.map(friend =&gt; {</span></span><br><span class="line">	<span class="comment">// 				let url = friend[1];</span></span><br><span class="line">	<span class="comment">// 				url = url.replace(/\/$/, ''); // 移除结尾斜杠 "/"</span></span><br><span class="line">	<span class="comment">// 			    url = url.replace(/^https?:\/\//, ''); // 移除http://或https://</span></span><br><span class="line">	<span class="comment">// 			    return url;</span></span><br><span class="line">	<span class="comment">// 			}); // 提取友链的链接部分</span></span><br><span class="line"> <span class="comment">//                // 更新config对象中的safeUrl数组</span></span><br><span class="line"> <span class="comment">//                config.safeUrl = config.safeUrl.concat(safeUrls);</span></span><br><span class="line"> <span class="comment">//                console.log('safeUrl已成功更新:', config.safeUrl);</span></span><br><span class="line"> <span class="comment">//            } catch (error) {</span></span><br><span class="line"> <span class="comment">//                console.error('解析JSON数据出错:', error);</span></span><br><span class="line"> <span class="comment">//            }</span></span><br><span class="line"> <span class="comment">//        } else {</span></span><br><span class="line"> <span class="comment">//            console.error('加载文件失败:', xhr.statusText);</span></span><br><span class="line"> <span class="comment">//        }</span></span><br><span class="line"> <span class="comment">//    };</span></span><br><span class="line"> <span class="comment">//    xhr.send();</span></span><br></pre></td></tr></tbody></table></figure><p>嗯，没错，我都屏蔽了，因为用不了。。。</p><p>其实可以看见，内容是正常的更新了的，如下：</p><p><img src="" data-lazy-src="https://p.liiiu.cn/i/2024/03/21/65fb93c7ce6d2.png" alt="控制台页面"></p><p>经过我上网查了资料，了解到，异步AJAX会同步新开启一个线程，这个没执行完的时候，下面的代码仍然会继续执行，所以导致还没有刷新列表，就已经跳转了不安全界面。那解决方法也很简单，异步改成同步呗（就是可能会导致加载不出文件一直进行不了下一步，不过加载不出文件导致页面崩溃也不只这一个问题了，多一个又何妨？QAQ）,如下：</p><figure class="highlight javascript"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 发送同步AJAX请求</span></span><br><span class="line"><span class="keyword">const</span> xhr = <span class="keyword">new</span> <span class="title class_">XMLHttpRequest</span>();</span><br><span class="line">xhr.<span class="title function_">open</span>(<span class="string">'GET'</span>, <span class="string">'friend.json'</span>, <span class="literal">false</span>); <span class="comment">// 第三个参数为 false 表示同步请求</span></span><br><span class="line">xhr.<span class="title function_">send</span>();</span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> (xhr.<span class="property">status</span> === <span class="number">200</span>) {</span><br><span class="line">	<span class="keyword">try</span> {</span><br><span class="line">	    <span class="keyword">const</span> friendData = <span class="title class_">JSON</span>.<span class="title function_">parse</span>(xhr.<span class="property">responseText</span>);</span><br><span class="line">	    <span class="keyword">const</span> safeUrls = friendData.<span class="property">friends</span>.<span class="title function_">map</span>(<span class="function"><span class="params">friend</span> =&gt;</span> {</span><br><span class="line">	        <span class="keyword">let</span> url = friend[<span class="number">1</span>];</span><br><span class="line">	        url = url.<span class="title function_">replace</span>(<span class="regexp">/\/$/</span>, <span class="string">''</span>); <span class="comment">// 移除结尾斜杠 "/"</span></span><br><span class="line">	        url = url.<span class="title function_">replace</span>(<span class="regexp">/^https?:\/\//</span>, <span class="string">''</span>); <span class="comment">// 移除http://或https://</span></span><br><span class="line">	        <span class="keyword">return</span> url;</span><br><span class="line">	    }); <span class="comment">// 提取友链的链接部分</span></span><br><span class="line">	    <span class="comment">// 更新config对象中的safeUrl数组</span></span><br><span class="line">	    config.<span class="property">safeUrl</span> = config.<span class="property">safeUrl</span>.<span class="title function_">concat</span>(safeUrls);</span><br><span class="line">	    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">'safeUrl已成功更新:'</span>, config.<span class="property">safeUrl</span>);</span><br><span class="line">	    </span><br><span class="line">	    <span class="comment">// 在数据加载完成后执行其他操作</span></span><br><span class="line">	    <span class="comment">// 可以调用 goInit(config) 函数等</span></span><br><span class="line">	    <span class="title function_">goInit</span>(config);</span><br><span class="line">	} <span class="keyword">catch</span> (error) {</span><br><span class="line">	    <span class="variable language_">console</span>.<span class="title function_">error</span>(<span class="string">'解析JSON数据出错:'</span>, error);</span><br><span class="line">	}</span><br><span class="line">} <span class="keyword">else</span> {</span><br><span class="line">	<span class="variable language_">console</span>.<span class="title function_">error</span>(<span class="string">'加载文件失败:'</span>, xhr.<span class="property">statusText</span>);</span><br><span class="line">}</span><br></pre></td></tr></tbody></table></figure><p>上面可以看到，我们在数据加载完成后才进行了goInit(config)函数操作，这样就可以确保不会出现先加载页面才加载完数据的问题。</p><p>下面就是butterfly的本身问题，应该可以发现我的html代码顶部有一个：</p><figure class="highlight txt"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">layout: false</span><br><span class="line">---</span><br></pre></td></tr></tbody></table></figure><p>​ 这个是为了防止我们的跳转页面被butterfly渲染而导致下面这个情况：</p><p><img src="" data-lazy-src="https://p.liiiu.cn/i/2024/03/21/65fb96fd7c0ea.png" alt="渲染导致和预期不符"></p><h2 id="twikoo安全跳转"><a href="#twikoo安全跳转" class="headerlink" title="twikoo安全跳转"></a>twikoo安全跳转</h2><p>在与<a target="_blank" rel="external nofollow noopener noreferrer" href="/safego/?u=aHR0cHM6Ly9ibG9nLmltc3l5LnRvcC8">无名小栈</a>站长交流的过程中，我发现他的博客中的评论区同样被安全跳转所包裹，于是我向他请教，最终实现了twikoo的安全链接跳转页面，其他聊天系统理论上也可以使用该方法进行重定向。</p><p><img src="" data-lazy-src="https://p.liiiu.cn/i/2024/03/23/65fdac731d57c.png" alt="交谈甚欢"></p><p>通过上方交谈我们可以了解到，当他加载完成后会执行一个函数，我们只需要知性这个个函数，然后识别其中的a标签，然后替换即可，通过翻找twikoo的issue，最终发现了一段类似的带么，可以直接用于重定向到我们的网页。</p><div class="liushen-tag-link"><a class="tag-Link" target="_blank" href="/safego/?u=aHR0cHM6Ly9naXRodWIuY29tL3R3aWtvb2pzL3R3aWtvby9pc3N1ZXMvNjQ3" rel="external nofollow noopener noreferrer"><div class="tag-link-tips">🙄引用站外地址，不保证站点的可用性和安全性</div><div class="tag-link-bottom"><div class="tag-link-left" style="background-image:url(https://p.liiiu.cn/i/2024/07/27/66a461a3098aa.webp)"></div><div class="tag-link-right"><div class="tag-link-title">github@twikoo</div><div class="tag-link-sitename">github.com/imaegoo</div></div><i class="fa-solid fa-angle-right"></i></div></a></div><p>通过搜索，最终定位到文件：<code>[blogroot]themes\butterfly\layout\includes\third-party\comments\twikoo.pug</code>，修改其中的代码：</p><figure class="highlight javascript"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line">……</span><br><span class="line"><span class="keyword">const</span> <span class="title function_">init</span> = (<span class="params"></span>) =&gt; {</span><br><span class="line">   twikoo.<span class="title function_">init</span>(<span class="title class_">Object</span>.<span class="title function_">assign</span>({</span><br><span class="line">     <span class="attr">el</span>: <span class="string">'#twikoo-wrap'</span>,</span><br><span class="line">     <span class="attr">envId</span>: <span class="string">'!{envId}'</span>,</span><br><span class="line">     <span class="attr">region</span>: <span class="string">'!{region}'</span>,</span><br><span class="line">     <span class="attr">onCommentLoaded</span>: <span class="function">() =&gt;</span> {</span><br><span class="line">       btf.<span class="title function_">loadLightbox</span>(<span class="variable language_">document</span>.<span class="title function_">querySelectorAll</span>(<span class="string">'#twikoo .tk-content img:not(.tk-owo-emotion)'</span>))</span><br><span class="line">       <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">'评论加载完成，开始替换相关链接'</span>);</span><br><span class="line">       <span class="variable language_">document</span>.<span class="title function_">querySelectorAll</span>(<span class="string">'a'</span>).<span class="title function_">forEach</span>(<span class="keyword">function</span>(<span class="params">aEl</span>){</span><br><span class="line">         <span class="keyword">if</span>(!aEl.<span class="property">href</span>.<span class="title function_">startsWith</span>(<span class="variable language_">window</span>.<span class="property">location</span>.<span class="property">origin</span>)){</span><br><span class="line">           aEl.<span class="property">href</span>=<span class="string">'/go.html?goUrl='</span>+<span class="built_in">encodeURI</span>(aEl.<span class="property">href</span>);</span><br><span class="line">         }</span><br><span class="line">       });</span><br><span class="line">     }</span><br><span class="line">   }, !{<span class="title class_">JSON</span>.<span class="title function_">stringify</span>(option)}))</span><br><span class="line">   </span><br><span class="line">   !{count ? <span class="string">'GLOBAL_CONFIG_SITE.isPost &amp;&amp; getCount()'</span> : <span class="string">''</span>}</span><br><span class="line">}</span><br><span class="line">……</span><br></pre></td></tr></tbody></table></figure><p>最终就可以实现twikoo的评论区安全链接跳转功能啦！理论上只要找到对应的触发事件，所有的评论系统都可以进行！</p><p>结束撒花！</p><p><em>— 柳影曳曳，清酒孤灯，扬笔撒墨，心境如霜</em></p></article><div class="post-copyright"><div class="post-copyright__title"><span class="post-copyright-info"><h>给博客添加一个安全跳转页面</h></span></div><div class="post-copyright__type"><span class="post-copyright-info"><a href="https://blog.liushen.fun/posts/8617b98/">https://blog.liushen.fun/posts/8617b98/</a></span></div><div class="post-copyright-m"><div class="post-copyright-m-info" style="position:relative;z-index:3"><div class="post-copyright-a" style="display:inline-block;width:fit-content;margin:20px 20px 20px 0"><h>作者</h><div class="post-copyright-cc-info"><h>LiuShen</h></div></div><div class="post-copyright-c" style="display:inline-block;width:fit-content;margin:20px 20px 20px 0"><h>发布于</h><div class="post-copyright-cc-info"><h>2024-03-21</h></div></div><div class="post-copyright-u" style="display:inline-block;width:fit-content;margin:20px 20px 20px 0"><h>更新于</h><div class="post-copyright-cc-info"><h>2024-03-23</h></div></div><div class="post-copyright-c" style="display:inline-block;width:fit-content;margin:20px 20px 20px 0"><h>许可协议</h><div class="post-copyright-cc-info"><a rel="noopener" target="_blank" title=" CC BY 4.0" href="https://creativecommons.org/licenses/by-nc-sa/4.0/?ref=chooser-v1">CC BY-NC-SA 4.0</a></div></div></div></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/Hexo/">Hexo</a><a class="post-meta__tags" href="/tags/%E5%AE%89%E5%85%A8%E8%B7%B3%E8%BD%AC/">安全跳转</a><a class="post-meta__tags" href="/tags/butterfly/">butterfly</a></div><div class="post-share"><div class="social-share" data-image="https://p.liiiu.cn/i/2024/03/25/6600dd916e6c0.png" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://jsd.liiiu.cn/npm/butterfly-extsrc@1.1.4/sharejs/dist/css/share.min.css" media="print" onload='this.media="all"'><script src="https://jsd.liiiu.cn/npm/butterfly-extsrc@1.1.4/sharejs/dist/js/social-share.min.js" defer></script></div></div><div class="post-reward"><div class="reward-button"><i class="fas fa-qrcode"></i>来😍鼠标过来一点~</div><div class="reward-main"><ul class="reward-all"><li class="reward-item"><a href="/config/img/wechat.png" target="_blank"><img class="post-qr-code-img" src="" data-lazy-src="/config/img/wechat.png" alt="微信"></a><div class="post-qr-code-desc">微信</div></li><li class="reward-item"><a href="/config/img/wechat.png" target="_blank"><img class="post-qr-code-img" src="" data-lazy-src="/config/img/wechat.png" alt="支付宝"></a><div class="post-qr-code-desc">支付宝</div></li></ul></div></div><nav class="pagination-post" id="pagination"><a class="prev-post pull-left" href="/posts/28ae33b6/" title="魔改笔记三：网站插件添加及显示效果美化"><img class="cover" src="" data-lazy-src="https://p.liiiu.cn/i/2024/04/10/661614d63d5e8.png" onerror='onerror=null,src="/img/404.jpg"' alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">魔改笔记三：网站插件添加及显示效果美化</div></div></a><a class="next-post pull-right" href="/posts/d249b963/" title="记录一次个人站点被DDoS攻击的经历"><img class="cover" src="" data-lazy-src="https://p.liiiu.cn/i/2024/03/24/66004922a1d4a.png" onerror='onerror=null,src="/img/404.jpg"' alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">记录一次个人站点被DDoS攻击的经历</div></div></a></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span>相关推荐</span></div><div class="relatedPosts-list"><a href="/posts/1dfd1f41/" title="安全跳转页面·插件版"><img class="cover" src="" data-lazy-src="https://p.liiiu.cn/i/2024/06/17/666f1ec25d642.webp" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2024-06-17</div><div class="title">安全跳转页面·插件版</div></div></a><a href="/posts/9efc1657/" title="安全跳转页面·重制版"><img class="cover" src="" data-lazy-src="https://p.liiiu.cn/i/2024/04/20/6623e50e7b7d2.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2024-04-21</div><div class="title">安全跳转页面·重制版</div></div></a><a href="/posts/a64defb4/" title="魔改笔记七：分类条及外链卡片"><img class="cover" src="" data-lazy-src="https://p.liiiu.cn/i/2024/08/10/66b74df1ab511.webp" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2024-08-10</div><div class="title">魔改笔记七：分类条及外链卡片</div></div></a></div></div><hr class="custom-hr"><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i> <span>评论</span></div></div><div class="comment-wrap"><div><div id="artalk-wrap"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info is-center"><div class="author-info-detail"><p class="author-info-hello">👋 欢迎光临！</p><p class="author-info-desc">你们好呀！我是站长LiuShen！一个快乐，积极，热爱生活的孩纸！😜😜😜</p></div><div class="avatar-img"><img class="mood-icon" src="" data-lazy-src="https://p.liiiu.cn/i/2025/03/14/67d301461a24a.webp" alt="🤤" onerror='this.onerror=null,this.src="/img/friend_404.gif"'><img src="" data-lazy-src="https://p.liiiu.cn/i/2025/03/13/67d2fc82d329c.webp" onerror='this.onerror=null,this.src="/img/friend_404.gif"' alt="avatar"></div><div class="author-info-name">LiuShen</div><div class="site-data"><a href="/archives/"><div class="headline">文章</div><div class="length-num">72</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">98</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">3</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/willow-god"><i class="fab fa-github"></i><span>Follow Me 🛫</span></a><div class="card-info-social-icons"><a class="social-icon" href="mailto:01@liushen.fun" target="_blank" title="Email"><i class="fa-solid fa-envelope"></i></a><a class="social-icon" href="http://wpa.qq.com/msgrd?v=3&amp;uin=3162475700&amp;site=qq&amp;menu=yes" target="_blank" title="QQ：3162475700"><i class="fa-brands fa-qq"></i></a><a class="social-icon" href="https://wakatime.com/@LiuShen" target="_blank" title="Wakatime"><i class="fa-solid fa-chart-column"></i></a><a class="social-icon" href="https://blog.liushen.fun/atom.xml" target="_blank" title="rss地址"><i class="fa-solid fa-rss"></i></a></div></div><div class="card-widget" id="card-poem"><div id="poem_sentence"></div><div id="poem_info"><div id="poem_dynasty"></div><div id="poem_author"></div></div></div><script src="/js/jinrishici.js" charset="utf-8"></script><script>jinrishici.load((function(e){var n=document.querySelector("#poem_sentence"),t=document.querySelector("#poem_author"),o=document.querySelector("#poem_dynasty"),r=e.data.content;r=r.substr(0,r.length-1),n.innerHTML=r,o.innerHTML=e.data.origin.dynasty,t.innerHTML=e.data.origin.author+"《"+e.data.origin.title+"》"}))</script><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content"><p><strong>博客架构概览：</strong><br>⚙️框架核心：Hexo<br>🕹️界面设计：Butterfly<br>🔮安全保障：长亭雷池<br>🔩管理工具：宝塔面板，1Panel<br>🎰服务器支持：阿里云，腾讯云<br>🎲CDN加速：多吉云，CloudFlare<br><strong>快捷跳转地址：</strong><br>🧩个人相册：<a target="_blank" rel="noopener" href="https://xc.liushen.fun">xc.liushen.fun</a><br>🤖个人导航：<a target="_blank" rel="noopener" href="https://www.liushen.fun">www.liushen.fun</a><br></p><img src="" data-lazy-src="/config/img/notice.gif" alt="可爱捏" title="可爱捏" style="width:100%;border-radius:10px"></div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%A2%8E%E7%A2%8E%E5%BF%B5"><span class="toc-text">碎碎念</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C"><span class="toc-text">准备工作</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%BC%80%E5%A7%8B%E9%83%A8%E7%BD%B2"><span class="toc-text">开始部署</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#twikoo%E5%AE%89%E5%85%A8%E8%B7%B3%E8%BD%AC"><span class="toc-text">twikoo安全跳转</span></a></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/posts/7915ee6b/" title="数据库可视化WEB工具对比"><img src="" data-lazy-src="https://p.liiiu.cn/i/2025/05/25/6832cc105bc41.webp" onerror='this.onerror=null,this.src="/img/404.jpg"' alt="数据库可视化WEB工具对比"></a><div class="content"><a class="title" href="/posts/7915ee6b/" title="数据库可视化WEB工具对比">数据库可视化WEB工具对比</a><time datetime="2025-05-25T10:01:21.000Z" title="更新于 2025-05-25 18:01:21">2025-05-25</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/40702a0d/" title="本地实现HEXO文章AI摘要"><img src="" data-lazy-src="https://p.liiiu.cn/i/2025/05/06/6819cd4532457.webp" onerror='this.onerror=null,this.src="/img/404.jpg"' alt="本地实现HEXO文章AI摘要"></a><div class="content"><a class="title" href="/posts/40702a0d/" title="本地实现HEXO文章AI摘要">本地实现HEXO文章AI摘要</a><time datetime="2025-05-06T16:01:21.000Z" title="更新于 2025-05-07 00:01:21">2025-05-07</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/5f71a4b1/" title="耗子面板和DPanel简单体验"><img src="" data-lazy-src="https://p.liiiu.cn/i/2025/04/27/680dc7916ef34.webp" onerror='this.onerror=null,this.src="/img/404.jpg"' alt="耗子面板和DPanel简单体验"></a><div class="content"><a class="title" href="/posts/5f71a4b1/" title="耗子面板和DPanel简单体验">耗子面板和DPanel简单体验</a><time datetime="2025-04-28T14:48:21.000Z" title="更新于 2025-04-28 22:48:21">2025-04-28</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/caee2d9f/" title="美化你的RSS订阅地址"><img src="" data-lazy-src="https://p.liiiu.cn/i/2025/04/18/68024a618942b.webp" onerror='this.onerror=null,this.src="/img/404.jpg"' alt="美化你的RSS订阅地址"></a><div class="content"><a class="title" href="/posts/caee2d9f/" title="美化你的RSS订阅地址">美化你的RSS订阅地址</a><time datetime="2025-04-18T12:48:21.000Z" title="更新于 2025-04-18 20:48:21">2025-04-18</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap" style="background:0 0"><div id="footer_icons"><div><a class="icon_link" rel="noopener external nofollow" href="https://www.liushen.fun/" title="导航站点" target="_blank"><i class="fa-solid fa-compass"></i></a><a class="icon_link" rel="noopener external nofollow" href="https://admin.qidian.qq.com/static_proxy/b2b-qq/wpa-link/index.html#/person?uin=3162475700" title="联系QQ" target="_blank"><i class="fa-brands fa-qq"></i></a><a class="icon_link" rel="noopener external nofollow" href="https://github.com/willow-god" title="我的github主页" target="_blank"><i class="fa-brands fa-github"></i></a><a class="icon_link" rel="noopener external nofollow" href="mailto:01@liushen.fun" title="发送邮件至博主邮箱" target="_blank"><i class="fa-solid fa-envelope"></i></a></div><div class="footer_logo_container" onclick="btf.scrollToDest(0,500)" title="返回顶部"><img class="footer_logo" src="" data-lazy-src="/img/footer.gif"></div><div><a class="icon_link" rel="noopener external nofollow" href="https://wakatime.com/@LiuShen" title="Wikitime" target="_blank"><i class="fa-solid fa-clock"></i></a><a class="icon_link" rel="noopener external nofollow" href="https://gitlab.com/" title="gitlab" target="_blank"><i class="fa-brands fa-gitlab"></i></a><a class="icon_link" href="/shuoshuo/" title="日常说说" data-pjax-state="data-pjax-state"><i class="fa-solid fa-file-pen"></i></a><a class="icon_link" href="/comment/" title="留言板" data-pjax-state="data-pjax-state"><i class="fa-solid fa-comment"></i></a></div></div><div id="footer_content"><div class="footer-group"><h3 class="footer-title">关于本站</h3><div class="footer-links"><a class="footer-item" target="_blank" href="https://www.liushen.fun/">导航站点</a><a class="footer-item" href="/shuoshuo/">日常说说</a><a class="footer-item" target="_blank" href="https://um.liushen.fun/share/bIEnQp0xnMxD8c9V/blog.liushen.fun">访客信息</a><a class="footer-item" target="_blank" href="https://mm.liushen.fun/">提笔摘星</a><a class="footer-item" target="_blank" href="https://status.liushen.fun/">在线状态</a><a class="footer-item" href="/subscribe/">订阅本站</a></div></div><div class="footer-group"><h3 class="footer-title">加入组织</h3><div class="footer-links"><a class="footer-item" target="_blank" href="https://www.boyouquan.com/home">博友圈</a><a class="footer-item" target="_blank" href="https://github.com/timqian/chinese-independent-blogs">中博列表</a><a class="footer-item" target="_blank" href="https://blogwe.com/">博客我们</a><a class="footer-item" target="_blank" href="https://storeweb.cn/">个性商店</a><a class="footer-item" target="_blank" href="https://bf.zzxworld.com/">发现博客</a><a class="footer-item" target="_blank" href="https://ourblo.gs/">OurBlogs</a></div></div><div class="footer-group"><h3 class="footer-title">文章整理</h3><div class="footer-links"><a class="footer-item" href="/categories/website/">博客管理</a><a class="footer-item" href="/categories/learning/">学习资料</a><a class="footer-item" href="/categories/daily-share/">日常分享</a><a class="footer-item" href="/archives/">时光卷轴</a><a class="footer-item" href="/charts/">文章通览</a><a class="footer-item" href="/categories/">查看全部</a></div></div><div class="footer-group"><h3 class="footer-title">文章标签</h3><div class="footer-links"><a class="footer-item" href="/tags/JavaScript/">JS知识</a><a class="footer-item" href="/tags/Hexo/">本站框架</a><a class="footer-item" href="/tags/机器学习/">机器学习</a><a class="footer-item" href="/tags/日记/">个人日记</a><a class="footer-item" href="/tags/CSS/">CSS知识</a><a class="footer-item" href="/tags/">查看全部</a></div></div><div class="footer-group"><h3 class="footer-title">自建工具</h3><div class="footer-links"><a class="footer-item" target="_blank" rel="noopener" href="https://chat.liushen.fun/">清羽AI</a><a class="footer-item" target="_blank" rel="noopener" href="https://hot.liushen.fun/">今日热榜</a><a class="footer-item" target="_blank" rel="noopener" href="https://cover.qyliu.top/">封面设计</a><a class="footer-item" target="_blank" rel="noopener" href="https://icon.qyliu.top/">万变图标</a><a class="footer-item" target="_blank" rel="noopener" href="https://tmail.qyliu.top/">临时邮箱</a><a class="footer-item" target="_blank" rel="noopener" href="https://share.liushen.fun/">内容中转</a></div></div><div class="footer-group" id="friend-links-in-footer"><h3 class="footer-title">友链<button title="换一批" href="javascript:;" onclick="liushen.randomLink()"><i class="fa-solid fa-rotate-right"></i></button></h3><div class="footer-links"><a class="footer-item" target="_blank" href="https://blog.liushen.fun">测试1</a><a class="footer-item" target="_blank" href="https://blog.liushen.fun">测试2</a><a class="footer-item" target="_blank" href="https://blog.liushen.fun">测试3</a><a class="footer-item" target="_blank" href="https://blog.liushen.fun">测试4</a><a class="footer-item" target="_blank" href="https://blog.liushen.fun">测试5</a><a class="footer-item" href="/link/" data-pjax-state="data-pjax-state">查看更多</a></div></div></div><div id="footer-bottom"><div class="footer-bottom-content"><div class="footer-bottom-left"><span class="copyright">©2021 - 2025 By <a target="_blank" rel="noopener" href="https://blog.liushen.fun/about/" title="点击访问&quot;LiuShen&quot;的主页" style="margin-left:5px">LiuShen</a></span><div><a class="footer-bottom-link" target="_blank" href="https://beian.miit.gov.cn/" rel="noopener external nofollow" title="工信部备案号">陕ICP备2024028531号-2</a><a class="footer-bottom-link" target="_blank" href="https://beian.mps.gov.cn/#/query/webSearch?code=61011602000637" rel="noopener external nofollow" title="公安备案号">陕公网安备61011602000637号</a></div></div><div class="footer-bottom-right"><div id="runtime" title="本站运行时间">本站已苟活：0 天 0 时 0 分 0 秒</div><div><a class="footer-bottom-link" target="_blank" href="https://www.dogecloud.com/?iuid=9173" rel="noopener external nofollow" title="本站通过多吉云CDN提供站点加速">多吉云CDN</a><a class="footer-bottom-link" target="_blank" href="https://hexo.io/zh-cn/" rel="noopener external nofollow" title="本站使用Hexo架构搭建而成">Hexo静态框架</a><a class="footer-bottom-link" target="_blank" href="https://butterfly.js.org/" rel="noopener external nofollow" title="本站主题由Butterfly主题魔改而成">LiuShen主题</a></div></div></div></div></div><script>window.liushen||(window.liushen={saveData:(e,n)=>{localStorage.setItem(e,JSON.stringify({time:Date.now(),data:n}))},loadData:(e,n)=>{let t=JSON.parse(localStorage.getItem(e));if(t){let e=Date.now()-t.time;if(e>=0&&e<6e4*n)return t.data}return null},runtime:()=>{const e=e=>e>9?e:"0"+e,n=new Date("2021/12/12 01:27:36").getTime(),t=Date.now();let i=Math.round((t-n)/1e3),o="本站已苟活：";i>=86400&&(o+=`${e(Math.floor(i/86400))} 天 `,i%=86400),i>=3600&&(o+=`${e(Math.floor(i/3600))} 时 `,i%=3600),i>=60&&(o+=`${e(Math.floor(i/60))} 分 `,i%=60),o+=`${e(i)} 秒`;const l=document.getElementById("runtime");l&&(l.innerHTML=o),setTimeout(window.liushen.runtime,1e3)},randomLink:()=>{let e=window.liushen.loadData("links",30);if(e){let n=document.querySelectorAll("#friend-links-in-footer .footer-item");if(!n.length)return;for(let t=0;t<n.length;t++){let i=Math.floor(Math.random()*e.length);n[t].innerText=e[i].name,n[t].href=e[i].link,e.splice(i,1)}}else fetch("/flink_count.json").then((e=>e.json())).then((e=>{window.liushen.saveData("links",e.link_list),window.liushen.randomLink()}))}}),window.liushen.randomLink(),document.addEventListener("DOMContentLoaded",window.liushen.randomLink),window.liushen.runtime()</script></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="translateLink" type="button" title="简繁转换" style="width:35px">繁</button><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i><span class="rightside-text">阅读模式</span></button><button id="darkmode" type="button" title="日间和夜间模式切换"><i class="fa-regular fa-star-half-stroke"></i><span class="rightside-text">亮暗切换</span></button><button id="cat" onclick="toggleLive2dVisibility()" title="小猫显隐"><i class="fa-solid fa-cat"></i><span class="rightside-text">小猫显隐</span></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fa-solid fa-arrows-left-right-to-line"></i><span class="rightside-text">侧栏显隐</span></button></div><div id="rightside-config-show"><button id="rightside-config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i><span class="rightside-text">更多设置</span></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i><span class="rightside-text">显示目录</span></button><button id="fullscreen" onclick="toggleFullScreen()" title="全屏切换"><i class="fa-solid fa-expand"></i><span class="rightside-text">全屏切换</span></button><a id="to_comment" href="#post-comment" title="前往评论"><i class="fas fa-comments"></i><span class="rightside-text">快速评论</span></a><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i><span class="rightside-text">回到顶部</span></button></div></div><div id="rightMenu"><div class="rightMenu-group rightMenu-small"><div class="rightMenu-item" id="menu-backward"><i class="fa-solid fa-arrow-left"></i></div><div class="rightMenu-item" id="menu-forward"><i class="fa-solid fa-arrow-right"></i></div><div class="rightMenu-item" id="menu-refresh"><i class="fa-solid fa-arrow-rotate-right"></i></div><div class="rightMenu-item" id="menu-home"><i class="fa-solid fa-house"></i></div></div><div class="rightMenu-group rightMenu-line hide" id="menu-text"><a class="rightMenu-item" id="copy" href="javascript:rm.copySelect();"><i class="fa-solid fa-copy"></i><span>复制选中文字</span></a><a class="rightMenu-item" id="reply" href="javascript:rm.replySelect();"><i class="fa-regular fa-comment"></i><span>评论选中段落</span></a></div><div class="rightMenu-group rightMenu-line rightMenuOther"><a class="rightMenu-item menu-link" href="/archives/"><i class="fa-solid fa-archive"></i><span>文章时间线</span></a><a class="rightMenu-item menu-link" href="/categories/"><i class="fa-solid fa-folder-open"></i><span>文章分大类</span></a><a class="rightMenu-item menu-link" href="/tags/"><i class="fa-solid fa-tags"></i><span>文章小标签</span></a></div><div class="rightMenu-group rightMenu-line rightMenuNormal"><a class="rightMenu-item menu-link" id="menu-radompage" href="/comment/"><i class="fa-solid fa-shoe-prints"></i><span>随心留言板</span></a><div class="rightMenu-item" id="menu-translate"><i class="fa-solid fa-earth-asia"></i><span>繁简模式切换</span></div><div class="rightMenu-item" id="menu-live2dvisibility"><i class="fa-solid fa-cat"></i><span>小猫显示隐藏</span></div><div class="rightMenu-item" id="menu-print"><i class="fa-solid fa-print fa-fw"></i><span>打印整个页面</span></div><a class="rightMenu-item menu-link" id="statement" href="/statement/"><i class="fa-regular fa-copyright fa-fw"></i><span>网站声明</span></a></div></div><div id="rightmenu-mask"></div><div><script src="/js/others.js?v=5.0.0"></script><script src="/js/utils.js?v=5.0.0"></script><script src="/js/main.js?v=5.0.0"></script><script src="https://jsd.liiiu.cn/npm/echarts@5.5.1/dist/echarts.simple.min.js"></script><script src="/js/rightmenu.js?v=5.0.0"></script><script src="/js/jinrishici.js"></script><script src="/js/tw_cn.js?v=5.0.0"></script><script src="https://jsd.liiiu.cn/npm/@fancyapps/ui@5.0.36/dist/fancybox/fancybox.umd.min.js"></script><script src="https://jsd.liiiu.cn/npm/instant.page@5.2.0/instantpage.min.js" type="module"></script><script src="https://jsd.liiiu.cn/npm/vanilla-lazyload@19.1.3/dist/lazyload.iife.min.js"></script><div class="js-pjax"><script>(()=>{let t=null;const e=null,o="shuoshuo"===GLOBAL_CONFIG_SITE.pageType,a=()=>{t&&(t.destroy(),t=null)},n=e=>t&&t.setDarkMode("dark"===e),l=(l=document,i=location.pathname)=>{t=Artalk.init({el:l.querySelector("#artalk-wrap"),server:"https://atk.liushen.fun",site:"清羽飞扬",darkMode:"dark"===document.documentElement.getAttribute("data-theme"),...e,pageKey:i,imgUploader:function(t){let e="Bearer 28|q18njD3pLtHiFy9WidqQrREwqZzb8Zionr8WzilI",o="https://www.baiwulin.work/api/v1/upload",a=new Headers;a.set("Accept","application/json"),a.set("Authorization",e);let n=new FormData;n.append("file",t);const l=(t,e,o)=>fetch(t,{method:"POST",body:e,headers:o}).then((t=>t.json())).then((t=>t.data.links.url)).catch((t=>(console.error("Image upload failed:",t),null)));return l(o,n,a).then((t=>t||(console.warn("雾林图床接口失败，尝试替换为秋叶图床"),e="Bearer 11|lsReISlSS0dyhDzt35ovtfYefGbWSRW2vvntPXs7",o="https://imgse.koxiuqiu.cc/api/v1/upload",a.set("Authorization",e),l(o,n,a))))}}),"null"!==GLOBAL_CONFIG.lightbox&&(t.on("list-loaded",(()=>{t.ctx.get("list").getCommentNodes().forEach((t=>{const e=t.getRender().$content;btf.loadLightbox(e.querySelectorAll("img:not([atk-emoticon])"))}))})),o&&(window.shuoshuoComment.destroyArtalk=()=>{a(),l.children.length&&(l.innerHTML="",l.classList.add("no-comment"))}),btf.addGlobalFn("pjaxSendOnce",a,"destroyArtalk"),btf.addGlobalFn("themeChange",n,"artalk"))},i=async(t,e)=>{"object"==typeof Artalk||(await btf.getCSS("https://jsd.liiiu.cn/npm/artalk@2.9.1/dist/Artalk.min.css"),await btf.getScript("https://jsd.liiiu.cn/npm/artalk@2.9.1/dist/Artalk.min.js")),l(t,e)};o?window.shuoshuoComment={loadComment:i}:setTimeout(i,0)})()</script></div><script>window.newestComments={changeContent:e=>(""===e||(e=(e=(e=(e=(e=e.replace(/<img.*?src="(.*?)"?[^\>]+>/gi,"[图片]")).replace(/<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi,"[链接]")).replace(/<pre><code>.*?<\/pre>/gi,"[代码]")).replace(/<code>.*?<\/code>/gi,"[代码]")).replace(/<[^>]+>/g,"")).length>150&&(e=e.substring(0,150)+"..."),e),generateHtml:(e,t)=>{let n="";if(e.length)for(let t=0;t<e.length;t++){if(n+='<div class="aside-list-item">',e[t].avatar){const a="data-lazy-src";n+=`<a href="${e[t].url}" class="thumbnail"><img ${a}="${e[t].avatar}" alt="${e[t].nick}"></a>`}n+=`<div class="content">\n        <a class="comment" href="${e[t].url}" title="${e[t].content}">${e[t].content}</a>\n        <div class="name"><span>${e[t].nick} / </span><time datetime="${e[t].date}">${btf.diffDate(e[t].date,!0)}</time></div>\n        </div></div>`}else n+="暂无评论";t.innerHTML=n,window.lazyLoadInstance&&window.lazyLoadInstance.update(),window.pjax&&window.pjax.refresh(t)},newestCommentInit:(e,t)=>{const n=document.querySelector("#card-newest-comments .aside-list");if(n){const a=btf.saveToLocal.get(e);a?newestComments.generateHtml(JSON.parse(a),n):t(n)}},run:(e,t)=>{newestComments.newestCommentInit(e,t),btf.addGlobalFn("pjaxComplete",(()=>newestComments.newestCommentInit(e,t)),e)}}</script><script>window.addEventListener("load",(()=>{const t="artalk-newest-comments",{changeContent:a,generateHtml:e,run:n}=window.newestComments,r=new URLSearchParams({site_name:"清羽飞扬",limit:"5"});n(t,(async n=>{try{const s=await fetch(`https://atk.liushen.fun/api/v2/stats/latest_comments?${r}`),o=await s.json(),{avatarCdn:c,avatarDefault:i}=await(async()=>{const t=t=>t.startsWith("d=")?t:`d=${t}`;try{const a=await fetch("https://atk.liushen.fun/api/v2/conf"),e=await a.json(),{mirror:n,params:r,default:s}=e.frontend_conf.gravatar;return{avatarCdn:n,avatarDefault:t(r||s)}}catch(a){return console.error(a),{avatarCdn:"",avatarDefault:t("")}}})(),l=o.data.map((t=>({avatar:c&&t.email_encrypted?`${c}${t.email_encrypted}?${i}`:"",content:a(t.content_marked),nick:t.nick,url:t.page_url,date:t.date})));btf.saveToLocal.set(t,JSON.stringify(l),10/1440),e(l,n)}catch(t){console.log(t),n.textContent="无法获取评论，请确认相关配置是否正确"}}))}))</script><script src="/config/memos/memos.js"></script><script id="canvas_nest" defer color="128,128,128" opacity="0.7" zindex="-1" count="99" mobile="false" src="https://jsd.liiiu.cn/npm/butterfly-extsrc@1.1.4/dist/canvas-nest.min.js"></script><link rel="stylesheet" href="https://jsd.liiiu.cn/npm/aplayer@1.10.1/dist/APlayer.min.css" media="print" onload='this.media="all"'><script src="https://jsd.liiiu.cn/npm/aplayer@1.10.1/dist/APlayer.min.js"></script><script src="https://jsd.liiiu.cn/npm/meting@2.0.1/dist/Meting.min.js"></script><script src="https://jsd.liiiu.cn/npm/pjax@0.2.8/pjax.min.js"></script><script>(()=>{window.pjax=new Pjax({elements:'a:not([target="_blank"])',selectors:["head > title","#config-diff","#body-wrap","#rightside-config-hide","#rightside-config-show",".js-pjax"],cacheBust:!1,analytics:!1,scrollRestoration:!1});const e=e=>{e&&Object.values(e).forEach((e=>e()))};document.addEventListener("pjax:send",(()=>{btf.removeGlobalFnEvent("pjaxSendOnce"),btf.removeGlobalFnEvent("themeChange");const t=document.body.classList;t.contains("read-mode")&&t.remove("read-mode"),e(window.globalFn.pjaxSend)})),document.addEventListener("pjax:complete",(()=>{btf.removeGlobalFnEvent("pjaxCompleteOnce"),document.querySelectorAll("script[data-pjax]").forEach((e=>{const t=document.createElement("script"),n=e.text||e.textContent||e.innerHTML||"";Array.from(e.attributes).forEach((e=>t.setAttribute(e.name,e.value))),t.appendChild(document.createTextNode(n)),e.parentNode.replaceChild(t,e)})),e(window.globalFn.pjaxComplete)})),document.addEventListener("pjax:error",(e=>{404===e.request.status&&pjax.loadUrl("/404")}))})()</script><script async data-pjax="" src="/config/busuanzi/busuanzi.js"></script><div id="algolia-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="search-wrap"><div id="algolia-search-input"></div><hr><div id="algolia-search-results"><div id="algolia-hits"></div><div id="algolia-pagination"></div><div id="algolia-info"><div class="algolia-stats"></div><div class="algolia-poweredBy"></div></div></div></div></div><div id="search-mask"></div><script src="https://jsd.liiiu.cn/npm/algoliasearch@5.8.1/dist/lite/builds/browser.umd.min.js"></script><script src="https://jsd.liiiu.cn/npm/instantsearch.js@4.75.0/dist/instantsearch.production.min.js"></script><script src="/js/search/algolia.js?v=5.0.0"></script></div></div><div class="needEndHide" id="nav-music"><div id="nav-music-hoverTips" onclick="liuMusic.musicToggle()">音乐已暂停</div><meting-js id="13597135963" server="netease" type="playlist" mutex="true" preload="none" data-lrctype="0" order="random" volume="0.8" api="https://met.liiiu.cn/meting/api?server=:server&amp;type=:type&amp;id=:id&amp;r=:r"></meting-js></div><script data-pjax="">function butterfly_swiper_injector_config(){var a=document.getElementById("recent-posts");console.log("已挂载butterfly_swiper"),a.insertAdjacentHTML("afterbegin",'<div class="recent-post-item" style="height: auto;width: 100%"><div class="blog-slider swiper-container-fade swiper-container-horizontal" id="swiper_container"><div class="blog-slider__wrp swiper-wrapper" style="transition-duration: 0ms;"><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/4bb33804/&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src= "" data-lazy-src="https://p.liiiu.cn/i/2025/04/08/67f49876a62e5.webp" alt="" onerror="this.src=/img/error-page.png; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2025-04-08</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/4bb33804/&quot;);" href="javascript:void(0);" alt="">PaddleYOLO训练自己的数据集</a><div class="blog-slider__text">近期一直在研究毕业设计，在其中，我涉及到了PaddleYOLO的训练和部署，在网上的教程较少，经过不断努力，我也算是跑出来了，所以在这里分享出来做个记录，防止下次使用又忘记了怎么搞。</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/4bb33804/&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/5f71a4b1/&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src= "" data-lazy-src="https://p.liiiu.cn/i/2025/04/27/680dc7916ef34.webp" alt="" onerror="this.src=/img/error-page.png; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2025-04-28</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/5f71a4b1/&quot;);" href="javascript:void(0);" alt="">耗子面板和DPanel简单体验</a><div class="blog-slider__text">最近毕业设计临近尾声，代码也敲完了，目前就剩稍微的调优，就可以开始写论文啦！在闲暇时间，我也尝试部署了一些不一样的面板程序，总感觉1panel稍微有些复杂，很多功能并用不上，比如GPU，下面简单分享一下我的体验。</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/5f71a4b1/&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/40702a0d/&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src= "" data-lazy-src="https://p.liiiu.cn/i/2025/05/06/6819cd4532457.webp" alt="" onerror="this.src=/img/error-page.png; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2025-05-07</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/40702a0d/&quot;);" href="javascript:void(0);" alt="">本地实现HEXO文章AI摘要</a><div class="blog-slider__text">五一假期结束啦！这五天啥也没干，就在宿舍敲代码，都快无聊死了，恰逢找到了一些免费API，就自己实现一个AI摘要吧！利用API生成摘要文本放在文章头部，再通过hexo进行渲染就好啦！</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/40702a0d/&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/7915ee6b/&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src= "" data-lazy-src="https://p.liiiu.cn/i/2025/05/25/6832cc105bc41.webp" alt="" onerror="this.src=/img/error-page.png; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2025-05-25</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/7915ee6b/&quot;);" href="javascript:void(0);" alt="">数据库可视化WEB工具对比</a><div class="blog-slider__text">最近迁移服务器，并且搞了一个1P专业版玩玩，感觉效果很不错，想找一个管理数据库的服务，其中看了phpmyadmin等一些知名项目，但是都不太符合我的要求，最后经过筛选，找到了比较合适的，分享给大家！</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/7915ee6b/&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/caee2d9f/&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src= "" data-lazy-src="https://p.liiiu.cn/i/2025/04/18/68024a618942b.webp" alt="" onerror="this.src=/img/error-page.png; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2025-04-18</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/caee2d9f/&quot;);" href="javascript:void(0);" alt="">美化你的RSS订阅地址</a><div class="blog-slider__text">近期天天忙着毕业设计，冷落了站点文章的更新，最近也终于算是快要搞完了，于是开始捣鼓一些好玩的东西，在浏览阮一峰大佬的周刊时，了解到了RSS也能美化，折腾了一下，没想到还真实现了，在此分享一下。</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/caee2d9f/&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div></div><div class="blog-slider__pagination swiper-pagination-clickable swiper-pagination-bullets"></div></div></div>')}for(var elist="null".split(","),cpage=location.pathname,epage="/",flag=0,i=0;i<elist.length;i++)cpage.includes(elist[i])&&flag++;("all"===epage&&0==flag||epage===cpage)&&butterfly_swiper_injector_config()</script><script defer src="https://jsd.liiiu.cn/npm/swiper@11.1.14/swiper-bundle.min.js"></script><script defer data-pjax="" src="/config/swiper/swiper_init.js"></script><script src="https://jsd.liiiu.cn/npm/live2d-widget@^3.1.3/lib/L2Dwidget.min.js"></script><script>L2Dwidget.init({pluginModelPath:"assets/",model:{scale:1,hHeadPos:.5,vHeadPos:.618,jsonPath:"/live2dw/assets/tororo.model.json"},display:{superSample:2,width:250,height:500,position:"left",hOffset:-20,vOffset:-90},mobile:{show:!1,scale:.5},react:{opacityDefault:.7,opacityOnHover:.2},log:!1,pluginJsPath:"lib/",pluginRootPath:"live2dw/",tagMode:!1})</script></body></html>